Created
May 26, 2014 20:15
-
-
Save 1337/b0d460eaa9736af992b6 to your computer and use it in GitHub Desktop.
Revisions
-
Brian L revised this gist
May 26, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,19 @@ // 1. [ ] how is "foo = function foo" from "foo = function"? // 2. [ ] what happens when you do "function foo(foo)"? var func = function func(func) { // 3. [ ] what happens when you do "var foo" in a "function(foo)"? var func; // 4. [ ] what is "typeof func" here? console.log(typeof func); }; // 5. [ ] what happens if you "function func" after the "var func" above? function func(func) { console.log("func"); } // 6. [ ] what is this "func" variable? // 7. [ ] what is ".call"? -> what does ".call" do? // 8. [ ] what is the second "func" (the first argument)? -
Brian L created this gist
May 26, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ // 1. [ ] how is "foo = function foo" from "foo = function"? // 2. [ ] what happens when you do "function foo(foo)"? var func = function func(func) { // 3. [ ] what happens when you do "var foo" in a "function(foo)"? var func; // 4. [ ] what is "typeof func" here? console.log(typeof func); }; // 5. [ ] what happens if you "function func" after the "var func" above? function func(func) { console.log("func"); } // 6. [ ] what is this "func" variable? // 7. [ ] what is ".call"? -> what does ".call" do? // 8. [ ] what is the second "func" (the first argument)? // 9. [ ] what arguments do "func" get? // 10. [ ] what if you swap ".call" with ".apply"? func.call(func, ["func"]);