You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readMe.md
+31-20Lines changed: 31 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,10 +227,15 @@ If you installed visual studio code, let us start using it.
227
227
Open the visual studio code by double-clicking the visual studio icon. When you open it, you will get this kind of interface. Try to interact with the labeled icons.
Your main.js file should be below all other scripts. Watch out your exercise needs to understand this line.
374
+
368
375

369
376
370
377
## Introduction to Data types
@@ -403,8 +410,8 @@ A boolean data type is either a True or False value.
403
410
**Example:**
404
411
405
412
```js
406
-
true#ifthelighton,thevalueistrue
407
-
false#ifthelightoff,thevalueisFalse
413
+
true// if the light on ,the value is true
414
+
false// if the light off, the value is False
408
415
```
409
416
410
417
### Undefined
@@ -431,8 +438,8 @@ To check the data type of a certain data type, we use the **typeof** operator. S
431
438
```js
432
439
console.log(typeof'Asabeneh') // string
433
440
console.log(typeof5) // number
434
-
console.log(typeof true ) // boolean
435
-
console.log(typeof null) // object type
441
+
console.log(typeoftrue ) // boolean
442
+
console.log(typeofnull) // object type
436
443
console.log(typeofundefined) // undefined
437
444
```
438
445
@@ -445,6 +452,7 @@ There are two ways of commenting:
445
452
-_Multiline commenting_
446
453
447
454
```js
455
+
// commenting the code itself with a single comment
448
456
// let firstName = 'Asabeneh'; single line comment
449
457
// let lastName = 'Yetayeh'; single line comment
450
458
```
@@ -466,10 +474,10 @@ Variables are _containers_ of data. Variables used to _store_ data in a memory l
466
474
467
475
For a variable that changes at a different time, we use _let_. If the data does not change at all, we use _const_. For example, PI, country name, gravity do no change, and we can use *const*.
468
476
469
-
* A JavaScript variable name should not begin with a number.
470
-
* A JavaScript variable name does not allow special characters except dollar sign and underscore.
471
-
* A JavaScript variable name follows a camelCase convention.
472
-
* A JavaScript variable name should not have space between words.
477
+
- A JavaScript variable name should not begin with a number.
478
+
- A JavaScript variable name does not allow special characters except dollar sign and underscore.
479
+
- A JavaScript variable name follows a camelCase convention.
480
+
- A JavaScript variable name should not have space between words.
473
481
474
482
The following are valid examples of JavaScript variables.
475
483
Valid variables in JavaScript:
@@ -516,21 +524,24 @@ Let us declare variables with different data types. To declare a variable, we ne
516
524
517
525
```js
518
526
// Declaring different variables of different data types
519
-
let firstName = 'Asabeneh' // first name of a person
520
-
let lastName = 'Yetayeh' // last name of a person
521
-
let country = 'Finland' // country
522
-
let city = 'Helsinki' // capital city
523
-
let age = 100 // age in years
527
+
528
+
let firstName ='Asabeneh'// first name of a person
0 commit comments