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
+19-16Lines changed: 19 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@
40
40
# Introduction
41
41
**Congratulations** for deciding to participate in a 30 days of JavaScript programming challenge . In this challenge you will learn everything you need to be a JavaScript programmer and in general the whole concepts of programming. In the end of the challenge you will get a 30DaysOfJavaScript programming challenge certificate. Join the [telegram group](https://t.me/ThirtyDaysOfJavaScript).
42
42
43
-
**A 30DaysOfJavaScript** is a guide for both beginners and advanced JavaScript developers. Welcome to JavaScript. JavaScript is the language of the browser.
43
+
**A 30DaysOfJavaScript**challenge is a guide for both beginners and advanced JavaScript developers. Welcome to JavaScript. I enjoy using and teaching JavaScript and I hope you will do so. JavaScript is the language of the browser.
44
44
45
45
In this step by step tutorial, you will learn JavaScript, the most popular programming language in the history of mankind.
46
46
You use JavaScript **_to add interactivity to websites, to develop mobile apps, desktop applications, games_** and nowadays JavaScript can be used for **_machine learning_** and **_AI_**.
@@ -56,7 +56,7 @@ No prior knowledge of programming is required to follow this challenge. You need
56
56
5. Code Editor
57
57
58
58
# Setup
59
-
I believe you have the motivation, computer and internet.
59
+
I believe you have the motivation and a strong desire to be a developer, computer and internet. If you have those you have everything.
60
60
61
61
## Install Node.js
62
62
You may not need it right now but you may need it for later. Install [node.js](https://nodejs.org/en/).
@@ -67,7 +67,7 @@ After downloading double click and install
67
67
68
68

69
69
70
-
We can check if node is installed in our machine by opening our device terminal or command prompt.
70
+
We can check if node is installed in our local machine by opening our device terminal or command prompt.
71
71
72
72
```sh
73
73
asabeneh $ node -v
@@ -78,9 +78,12 @@ I am using node version 12.14.0 which is the recommended version of node.
78
78
## Browser
79
79
There are many browsers out there but I strongly recommend Google Chrome.
80
80
### Installing Google Chrome
81
-
Install [google chrome](https://www.google.com/chrome/) if you do not have one yet. We can write small JavaScript code on the browser console but we can not use the browser console to develop applications.
81
+
Install [google chrome](https://www.google.com/chrome/) if you do not have one yet. We can write small JavaScript code on the browser console but we do not use the browser console to develop applications.
82
+
83
+

84
+
82
85
### Opening Google Chrome Console
83
-
You can open the google chrome either by clicking three dots at the top right corner of chrome or using short cut. I prefer short cuts.
86
+
You can open the google chrome either by clicking three dots at the top right corner of chrome browser or using a shortcut. I prefer using shortcuts.
To write our first JavaScript code we used a builtin function **console.log()**. We passed an argument as an input data and the function display the output. We passed 'Hello, World' as input data or argument in the condole.log() function.
115
+
To write our first JavaScript code we used a builtin function **console.log()**. We passed an argument as an input data and the function display the output. We passed 'Hello, World' as input data or argument in the console.log() function.
113
116
```js
114
117
console.log('Hello, World!')
115
118
```
@@ -256,7 +259,7 @@ This is how we write internal script most of the time. Writing the JavaScript co
256
259
</html>
257
260
```
258
261
Open the browser console to see the out put from the console.log()
259
-

262
+

260
263
261
264
## External script
262
265
Similar to the internal script, the external script link can be on the header or body but it is preferred to put it in the body.
@@ -347,7 +350,7 @@ A boolean data type is either a True or False value.
347
350
**Example:**
348
351
349
352
```js
350
-
true#ifthelighton,thevalueistrue
353
+
true#ifthelighton,thevalueistrue
351
354
false#ifthelightoff,thevalueisFalse
352
355
```
353
356
@@ -364,7 +367,7 @@ Null in JavaScript means an empty value.
364
367
365
368
## Checking Data types
366
369
367
-
To check the data type of a certain data type we use the **typeOf** operator. See the following example.
370
+
To check the data type of a certain data type we use the **typeof** operator. See the following example.
368
371
```js
369
372
console.log(typeof 'Asabeneh') // string
370
373
console.log(typeof 5) // number
@@ -395,13 +398,13 @@ Multiline commenting:
395
398
```
396
399
397
400
# Variables
398
-
Variables are _containers_ of data. Variables _store_ data in a memory location. When a variable is declared a memory location is reserved and when it is assigned to a value, the memory space will be filled with that data. To declare a variable we use, _var_, _let_ or _const_ key words. I will talk about var, let and const in detail in other section(scope). For now, the above explanation is enough.
401
+
Variables are _containers_ of data. Variables _store_ data in a memory location. When a variable is declared a memory location is reserved and when it is assigned to a value, the memory space will be filled with that data. To declare a variable we use, _var_, _let_ or _const_ keywords. I will talk about var, let and const in detail in other section(scope). For now, the above explanation is enough.
399
402
400
403
For a variable which changes at different time we use _let_ but if the data doesn'tchangeatallweuse_const_.ForexamplePI,countryname,gravitydonochangeandwecanuse*const*.
401
404
402
405
AJavaScriptvariablenameshouldn't begin with a number
403
406
A JavaScript variable name does not allow special characters except dollar sign and underscore.
404
-
A JavaScript variable name follow a camelCase convention.
407
+
A JavaScript variable name follows a camelCase convention.
405
408
A JavaScript variable name shouldn'thavespacebetweenwords.ThefollowingarevalidexamplesofJavaScriptvariables.
406
409
407
410
ValidvariablesinJavaScript:
@@ -423,8 +426,8 @@ Valid variables in JavaScript:
0 commit comments