Skip to content

drjonesy/JS-Scope-Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scope Challenge

Fix the code so there are no Errors (x)

Instructions

Download this entire respository or use git clone.

git clone https://github.com/drjonesy/JS-Scope-Challenge.git 

Once the respository is downloaded, open SpecRunner.html in a browser.

In the browser you will see Function Exercises with a single check-mark and bunch of (x)'s. The errors refer to code that needs to be fixed.

Now in a text editor like Sublime Text, Notepad++, or your own personal choice. Open the functions.js file. (it is recommended to use a syntax highliting editor)

In functions.js you need to fix the code so the errors dissappear. You may only change the '???' value

expect(ACTUAL === '???').to.be.true;

The value can be a number, a string, null, or undefined

ex: 'string', 2, null, undefined

In the browser, SpecRunner.html, clicking on the Text Error will display the current code that needs to be fixed.

NOT ALLOWED

You are not allowed to change any of the code in functions.js, except for the value: '???'

Grading:

'B' and below

To get a "B", short for bare minimum. Complete the challenge, push to github, and submit your link for grading.

'A' - 100%

If you want an "A", then explain in the comments below after each challenge how you got your answer. Then push to github and submit your link for grading.

Example #1:
expect(ACTUAL === 'inner').to.be.true;
/* 
ACTUAL is assigned the value the variable name within the function.
*/

Original Repository: https://github.com/bgando/functionalJS/tree/master/scope