This assignment focuses on practicing variable declaration in JavaScript.
- Open the
variables.jsfile. - Complete the functions as per the instructions provided in each function's comment block.
- Save the file and run the tests using Jest to verify your implementations.
- Clone this repository.
- Open
variables.js. - Follow the instructions within each function's comments.
- Run
npm installto install dependencies. - Run
npm testto test your code using Jest.
| Function Name | Description |
|---|---|
declareVarOne() |
Declare a variable myVar and assign it the value 10. |
declareVarTwo() |
Declare a variable userName and assign it the value "John Doe". |
declareVarThree() |
Declare a variable isCompleted and assign it the value true. |
declareVarFour() |
Declare a variable emptyArray and assign it an empty array []. |
declareVarFive() |
Declare a variable nullVar and assign it the value null. |
declareVarSix() |
Declare a variable undefinedVar without assigning any value to it. |
variables.js: Starter file where you will write your code.variables.test.js: Test file to check your implementations using Jest.