2
2
3
3
## Learning Goals
4
4
5
- - Practice using the ` const ` and ` let ` variables in JavaScript
5
+ - Practice using ` const ` and ` let ` to declare variables in JavaScript
6
6
7
7
## Instructions
8
8
9
- We've covered a lot of JavaScript concepts, but now it's time to put the
10
- concepts into practice. We'll start with variables.
9
+ In this lab we'll practice declaring and assigning values to variables. We'll
10
+ also go over how to read the test document. Understanding how to read the tests
11
+ can be a valuable tool in figuring out exactly what you'll need to do to
12
+ complete the lab.
11
13
12
14
### Tests
13
15
@@ -41,12 +43,8 @@ that matter, will still have CONTRIBUTING.md, LICENSE.md, and README.md files.)
41
43
42
44
### Code Along
43
45
44
- Open up ` index.js ` in your text editor. If you're using the Learn IDE, click the
45
- blue "Open" button in the top right hand corner of the lesson. If you open up
46
- that ` js-basics-variables-lab/ ` directory, you'll see a list of files (along
47
- with a ` test/ ` directory). Click ` index.js ` , and it will open in the editor.
48
-
49
- In ` index.js ` , you should see, well, nothing. We'll fix that soon.
46
+ Open up ` index.js ` in your text editor; you should see, well, nothing. We'll fix
47
+ that soon.
50
48
51
49
Now open up ` test/indexTest.js ` . Hey, there's something! What's all of this
52
50
stuff doing?
@@ -97,11 +95,10 @@ gather the information that you can. We will also provide instructions in the
97
95
98
96
## Running the Tests
99
97
100
- To run the tests, type ` learn ` or ` learn test ` in the terminal. (If you're using
101
- the IDE, the terminal is the part below where you've been coding.) You should
102
- now see the current status of the tests in the terminal. For the moment, all of
103
- the tests fail. Let's figure out how to get one of them passing! (The rest will
104
- be up to you.)
98
+ To run the tests, type ` learn ` or ` learn test ` in the terminal. You should now
99
+ see the current status of the tests in the terminal. For the moment, all of the
100
+ tests fail. Let's figure out how to get one of them passing! (The rest will be
101
+ up to you.)
105
102
106
103
To get our first test to pass, we can open up our ` index.js ` file, and write the
107
104
following:
@@ -122,8 +119,7 @@ for a lab:
122
119
1 . Run ` learn ` .
123
120
2 . Read the errors; vocalize what they're asking you to do.
124
121
3 . Write code; repeat steps 1 and 2 often until a test passes.
125
- 4 . Repeat as needed for further tests.
126
- 5 . Unless you're working in Canvas, run ` learn submit ` when finished!
122
+ 4 . Repeat as needed until all the tests are passing.
127
123
128
124
## Working Through the Problems
129
125
0 commit comments