File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11// This is just an instruction for the first activity - but it is just for human consumption
2- // We don't want the computer to run these 2 lines - how can we solve this problem?
2+ // We don't want the computer to run these 2 lines - how can we solve this problem?
3+
4+ // To make a multi-line comment in JavaScript, you can start with /* and end with */ . Any text
5+ // in between will be considered a comment and will not be executed as code by the computer.
Original file line number Diff line number Diff line change 11// trying to create an age variable and then reassign the value by 1
22
3- // to run this file we need to go in the root and once we are in the file run, node 1.js eg => /Sprint-1/errors node 1.js
3+ // to run this file we need to go in the root and once we are in the file run, node 1.js eg => cd /Sprint-1/errors => ~ node 1.js
44
5- cost age = 33 ; // this line is not working because const does not allow you change the data so we can change to let.
6- age = age + 1 ;
7- console . log ( age ) ;
5+
6+ // this line is not working because const does not allow you change the data so we can change to let.
7+ // cost age. = 33;
8+ // age = age + 1;
9+ // console.log(age);
810
911
1012let age = 33 ;
Original file line number Diff line number Diff line change 11// Currently trying to print the string "I was born in Bolton" but it isn't working...
22// what's the error ?
33
4- console . log ( `I was born in ${ cityOfBirth } ` ) ;
4+
55const cityOfBirth = "Bolton" ;
6+ console . log ( `I was born in ${ cityOfBirth } ` ) ;
7+
8+ // we just need to move the console.log() to avoid render and expression which was calling the data declared in the variable
9+ //ReferenceError: Cannot access 'cityOfBirth' before initialization
You can’t perform that action at this time.
0 commit comments