Skip to content

Commit 93be4cb

Browse files
authored
Update some description for part1
1 parent df737d2 commit 93be4cb

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

js/level1.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
They will help us up to guide you through the javaScript introduction journey.
66
There is a multi-line comments, like this one and also you can leave a single line comment
77
right in your code, example below. If you need to write some notes use comments starting with '//'
8+
To comment out - means comment your lines of code, so computer skip them.
89
*/
910

1011
//I'm your one-line comment
@@ -14,7 +15,7 @@
1415
There is few ways you can do it and we will look into few of them:
1516
- console.log('Hello World!'); - this line of code will print 'Hello World!' to the browser's console.
1617
P.S: To see browser's console you can do right click in the window of you browser(Chrome, Firefox etc)
17-
and select 'Inspect' or 'Inspect element' after that a console will appear on the bottom of the page.
18+
and select 'Inspect' or 'Inspect element' after that a console will appear on the bottom/right side of the page.
1819
- alert('Hello girls!'); - this line of code will pop-up a small window in your browser with text 'Hello girls!' in it,
1920
but you need to refresh opened page first.
2021
*/
@@ -26,7 +27,8 @@
2627

2728

2829

29-
//TODO: After alert works for you, comment it out and refresh the page - it should not pop-up anymore.
30+
//TODO: After alert works for you, comment it out(put '//' on the line where your code is and save changes) after refresh the page -
31+
// it should not pop-up anymore.
3032

3133
//TODO: What you say about trying console.log your message to browser? Send any message you like.
3234

@@ -48,7 +50,7 @@
4850
Boolean - it represents logical values - True or False
4951
*/
5052

51-
//TODO: Now create two empty variable named numberOne and numberTwo
53+
//TODO: Now create two empty variables named numberOne and numberTwo
5254

5355

5456

@@ -67,7 +69,7 @@
6769

6870

6971

70-
//TODO: Don't forget to comment alerts if you don't want them to pop-up every time
72+
//TODO: Don't forget to comment out alerts if you don't want them to pop-up every time
7173

7274

7375
/* Arithmetic operators
@@ -96,13 +98,14 @@
9698
To call the function we do so:
9799
functionName(10);
98100
Now we will call our function with argument that is 10. And our function will return us 20. To see what our function
99-
returns us we can console.log it, for example.
101+
returns us we can console.log it, for example:
102+
console.log(functionName(10));
100103
*/
101104

102105
//TODO: It's your turn to create a function.
103-
//Step 1 - Name it 'add' and pass in two argumnets (num1 and num2).
106+
//Step 1 - Name it 'add' and pass in two argumnets (num1 and num2) - to pass multiple arguments into function we seperate them with coma.
104107
//Step 2 - This function should return us a sum of num1 and num2.
105-
//Step 3 - Call the function with numbers 2 and 3. To see result you can alert it or console.log it - to be sure that it works right.
108+
//Step 3 - Call the function passing numbers 2 and 3 as arguments. To see result you can alert it or console.log it - to be sure that it works right.
106109

107110

108111

@@ -122,7 +125,7 @@
122125

123126
/*If-else statements
124127
What if we want our program to make a decision which function it should run? In this case we can use conditions.
125-
If spider is big, action should be - run and save your life, but if it is tiny you can simply walk away.
128+
If you have TV you can watch it in the evening, if not - you might do something else.
126129
Same with code, you can give 'if' condition to machine to make a decision what part of code to run.
127130
Structure:
128131
if(condition){

0 commit comments

Comments
 (0)