- Notifications
You must be signed in to change notification settings - Fork0
License
Paparacis/javascript-fix-the-scope-lab-js-intro-000
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Explore scope in JavaScript
- Exercise bug-finding skills related to scope issues
In this lab, you'll need to debug some issues related to function scope in #"auto">As usual, start by running the specs and reading the results. Then fix some things, run the tests again, and repeat.
You're probably pretty good at this right now — good luck!
Remember the purpose of using() is to call functions in JavaScript. It essentially tells our code toexecute the function. A function called without a(), like simplyfunctionName, will return the function but NOT run it. You'll see the return value as[Function: functionName].
To get our code to execute that function, we instead callfunctionName(), which executes the code within that function.
As an example, the third test here at first returns:Error: Expected [Function: funkyFunction] to equal 'FUNKY!'
We can make the function execute by saying this:var theFunk = funkyFunction() But this returns ANOTHER FUNCTION! How would we tell that function to execute to return the string within it?
ViewFix The Scope Lab on Learn.co and start learning to code for free.
About
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- JavaScript77.1%
- HTML22.9%