Skip to content

Instantly share code, notes, and snippets.

@slota
Forked from stevekinney/1510-function-cfus.md
Last active March 30, 2016 16:21
Show Gist options
  • Save slota/d87f2f3d5b65de0c4473cf60ca37f27c to your computer and use it in GitHub Desktop.
Save slota/d87f2f3d5b65de0c4473cf60ca37f27c to your computer and use it in GitHub Desktop.

JavaScript Functions

I can explain the difference between function declarations and function expressions.

  • Yes vars are expressions and regular functions are delcaration!!!

I can explain what the value of this is in a normal function.

  • normally it's the window or the global objec

I can explain what the value of this is when called from the context of an object.

  • if in an object it will be whatever that object is

I can explain how to explicitly set the value of this in a function.

  • you can set it to be equal to whatver you want it to be

I can explain the difference between call and apply.

I can describe an case where I might need to use bind to avoid polluting the global scope.

I can explain how bind works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment