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
@@ -61,14 +61,14 @@
61
61
62
62
## Introduction
63
63
64
-
**Congratulations** for deciding to participate in 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 concept of programming. In the end of the challenge you will get a 30DaysOfJavaScript programming challenge certificate. Join the [telegram group](https://t.me/ThirtyDaysOfJavaScript).
64
+
**Congratulations** for deciding to participate in 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 concept of programming. In the end of the challenge you will get a 30DaysOfJavaScript programming challenge completion certificate. In case you need help or if you would like to help others you may join the [telegram group](https://t.me/ThirtyDaysOfJavaScript).
65
65
66
-
**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 too. JavaScript is the language of the web browser.
66
+
**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 too. JavaScript is the language of the web.
67
67
68
68
In this step by step tutorial, you will learn JavaScript, the most popular programming language in the history of mankind.
69
69
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_**.
70
70
**_JavaScript (JS)_** has increased in popularity in recent years and has been the leading
71
-
programming language for four consecutive years and is the most used programming language on
71
+
programming language for six consecutive years and is the most used programming language on
72
72
Github.
73
73
74
74
## Requirements
@@ -83,11 +83,11 @@ No prior knowledge of programming is required to follow this challenge. You need
83
83
84
84
## Setup
85
85
86
-
I believe you have the motivation and a strong desire to be a developer, computer and Internet. If you have those, then you have everything.
86
+
I believe you have the motivation and a strong desire to be a developer, computer and Internet. If you have those, then you have everything to get started.
87
87
88
88
### Install Node.js
89
89
90
-
You may not need it right now but you may need it for later. Install [node.js](https://nodejs.org/en/).
90
+
You may not need node.js right now but you may need it for later. Install [node.js](https://nodejs.org/en/).
91
91
92
92

93
93
@@ -193,7 +193,7 @@ We add comments to our code. Comments are very important to make code more reada
193
193
194
194
##### Syntax
195
195
196
-
JavaScript is a programming language. As a result, it has its syntaxlike other programming languages. If we do not write a syntax that JavaScript understands, it will raise different types of errors. We will explore different kinds of JavaScript errors later. For now, let us see syntax errors.
196
+
Programming languages are similar to human languages. English language or any other language uses words, phrases, sentences,compound sentences and other more to convey a meaningful message. The English meaning of syntax is *the arrangement of words and phrases to create well-formed sentences in a language*. The technical definition of syntax is *the structure of statements in a computer language.* Programing languages have syntax. JavaScript is a programming language and like other programming languages it has its own syntax. If we do not write a syntax that JavaScript understands, it will raise different types of errors. We will explore different kinds of JavaScript errors later. For now, let us see syntax errors.
We can write our codes on the browser console, but it won't do for bigger projects. In a real working environment, developers use different code editors to write their codes. In this 30 days python JavaScript challenge, we will use Visual Studio Code.
234
+
We can write our codes on the browser console, but it won't do for bigger projects. In a real working environment, developers use different code editors to write their codes. In this 30 days JavaScript challenge, we will use Visual Studio Code.
235
235
236
236
#### Installing Visual Studio Code
237
237
238
-
VVisual studio code is a very popular open-source text editor. I would recommend to [download Visual Studio Code](https://code.visualstudio.com/), but if you are in favor of other editors, feel free to follow with what you have.
238
+
Visual studio code is a very popular open-source text editor. I would recommend to [download Visual Studio Code](https://code.visualstudio.com/), but if you are in favor of other editors, feel free to follow with what you have.
239
239
240
240

241
241
@@ -420,19 +420,20 @@ A collection of one or more characters under a single quote, double quote, or ba
420
420
"I love teaching"
421
421
'I hope you are enjoying the first day'
422
422
`We can also create a string using a backtick`
423
+
'A string could be just as small as one character as big as many pages'
423
424
```
424
425
425
426
### Booleans
426
427
427
428
A boolean value is either True or False. Any comparisons return a boolean value, which is either true or false.
428
429
429
-
A boolean data type is either a True or False value.
430
+
A boolean data type is either a true or false value.
430
431
431
432
**Example:**
432
433
433
434
```js
434
435
true// if the light on ,the value is true
435
-
false// if the light off, the value is False
436
+
false// if the light off, the value is false
436
437
```
437
438
438
439
### Undefined
@@ -493,7 +494,9 @@ Multiline commenting:
493
494
494
495
Variables are _containers_ of data. Variables used to _store_ data in a memory location. When a variable is declared, a memory location is reserved. When a variable is assigned to a value (data), the memory space will be filled with that data. To declare a variable, we use _var_, _let_, or _const_ keywords. We will talk more about var, let, and const in detail in other sections (scope). For now, the above explanation is enough.
495
496
496
-
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*.
497
+
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*. We will not use var in this challenge and I don't recommend you to use it. It is error prone way of declaring variable it has lots of leak.
498
+
499
+
A valid JavaScript
497
500
498
501
- A JavaScript variable name should not begin with a number.
499
502
- A JavaScript variable name does not allow special characters except dollar sign and underscore.
@@ -514,7 +517,7 @@ Valid variables in JavaScript:
514
517
515
518
first_name
516
519
last_name
517
-
is_marreid
520
+
is_married
518
521
capital_city
519
522
520
523
num1
@@ -537,7 +540,7 @@ Invalid variables:
537
540
Let us declare variables with different data types. To declare a variable, we need to use let or const keyword before the variable name. Following the variable name, we write an equal sign (assignment operator), and a value.
538
541
539
542
```js
540
-
# Syntax
543
+
// Syntax
541
544
let nameOfVariable = value
542
545
```
543
546
@@ -594,8 +597,8 @@ When you run the files on 01-Day folder you should get this:
594
597
# 💻 Day 1: Exercises
595
598
596
599
1. Write a single line comment which says, _comments can make code readable_
597
-
2. Write another single comment which says, *welcome to 30DaysOfJavaScript*
598
-
3. Write a multiline comment which says, _comments can make code readable, easy to use_
600
+
2. Write another single comment which says, *Welcome to 30DaysOfJavaScript*
601
+
3. Write a multiline comment which says, _comments can make code readable, easy to reuse_
599
602
_and informative_
600
603
601
604
4. Create a variable.js file and declare variables and assign string, boolean, undefined and null data types
0 commit comments