# hider-order function

1개의 포스트
post-thumbnail

[JS] default parameters, first-class and higher-order functions

Default Parameters Default Parameters는 어떠한 형태로든 설정이 가능하다. How Passing Arguments Works : Value vs Reference primitive type -> flightNum(parameter)는 copy of that original value. (not the original value of the flight variable) 그렇기에 flightNum으로 flight의 값을 바꾸는 것은 불가능. 전혀 다른 value임. reference type -> as we are manipulating the passenger object, it is exactly the same as manipulating the Jonas object. They both are the same object in the memory heap. ** 요약 : primitive type의 값을 함수에 전달하는 것은 그 값

2021년 12월 14일
·
0개의 댓글
·