TIL 20/04/21 (package.json,call,apply,bind)

Seonmi Choi·2021년 4월 20일
0

Start again!!!

목록 보기
5/40
post-custom-banner

npm : storage of module

npm install //creating package.json
npm ls --depth=0 // module list??
package-lock.json // where are they from??

Package.json : define the infomation of project.
dependency package version infomation
"dependencies" : required for execution in application
"devDependencies": required for only local development and test
if you want to save to "devDependencies",

npm install <module> --save dev

common ground between browser and node.js : javascript runtime

deference between browser and node.js : no window(global variable) and document(dom)

ptototype : 원형 객체!!!

arrow function = block scope(not 'function scope', no 'this')
this : only in function scope!!!

call apply bind : first parameter is 'this'
call apply : run immediately
call bind : second parameter is factor
bind : same with 'call'
binding a 'this'
and run the function itself
apply : second parameter is array

~ : tilde
^ : caret

onclick = function{}
after click the button, run the event
no result just function itself!!!

profile
I am not afraid of learning!
post-custom-banner

0개의 댓글