|
25 | 25 | 19. [Regular Expressions](#regular-expressions)
|
26 | 26 | 20. [Local Storage](#local-storage)
|
27 | 27 | 21. [Cookies](#cookies)
|
| 28 | +22. [JavaScript Tests](https://github.com/Asabeneh/JavaScript-for-Everyone/wiki/JavaScript-Tests): |
| 29 | +23. [JavaScript Interview Questions](#javascript-interview-questions) |
28 | 30 |
|
29 |
| -## Introduction |
30 | 31 |
|
31 |
| -Welcome to JavaScript. **_Congratulations_** for deciding to learn JavaScript. |
32 |
| -**_JavaScript for Everone_** is a guide for both beginner and advanced JavaScript developers. |
| 32 | +## Introduction |
| 33 | +**_JavaScript for Everone_** is a guide for both beginner and advanced JavaScript developers. Welcome to JavaScript. **_Congratulations_** for deciding to learn JavaScript. |
33 | 34 |
|
34 |
| -In this step by step tutorial, I will teach you JavaScript, the most popular programming language in the history of mankind. |
| 35 | +In this step by step tutorial, you will learn JavaScript, the most popular programming language in the history of mankind. |
35 | 36 | 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_**.
|
36 | 37 | **_JavaScript (JS)_** has increased in popularity in recent years and has been the leading
|
37 | 38 | programming language for four consecutive years and is the most used programming language on
|
@@ -101,6 +102,39 @@ Internal script can be written in the _head_ or the _body_ but it is preferrable
|
101 | 102 | ## Variables
|
102 | 103 | 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. To declare a variable we use, _var_, _let_ or _const_ key word. For a variable which changes at different time we use _let_ but if the data doesn't change at all we use _const_. For example PI, country name, gravity.
|
103 | 104 |
|
| 105 | +Valid variables in JavaScript: |
| 106 | +```js |
| 107 | + firstName |
| 108 | + lastName |
| 109 | + country |
| 110 | + city |
| 111 | + capitalCity |
| 112 | + age |
| 113 | + isMarried |
| 114 | +
|
| 115 | + first_name |
| 116 | + last_name |
| 117 | + is_marreid |
| 118 | + capital_city |
| 119 | +
|
| 120 | + num1 |
| 121 | + num_1 |
| 122 | + _num_1 |
| 123 | + $num1 |
| 124 | + year2019 |
| 125 | + year_2019 |
| 126 | +``` |
| 127 | +
|
| 128 | +Camel case or the first way of declaring is conventional in JavaScript. |
| 129 | +
|
| 130 | +Invalid variable: |
| 131 | +```js |
| 132 | + first-name |
| 133 | + 1_num |
| 134 | + num_#_1 |
| 135 | +``` |
| 136 | +
|
| 137 | +
|
104 | 138 | ```js
|
105 | 139 | // Declaring different variables of different data types
|
106 | 140 | let firstName = "Asabeneh"; // first name of a person
|
@@ -2112,6 +2146,8 @@ localStorage.clear();
|
2112 | 2146 | ## Exercises:Local Storage
|
2113 | 2147 |
|
2114 | 2148 | ## Cookies
|
| 2149 | +## [JavaScript Tests](https://github.com/Asabeneh/JavaScript-for-Everyone/wiki/JavaScript-Tests) |
| 2150 | +## JavaScript Interview Questions |
2115 | 2151 |
|
2116 | 2152 | #### Exercises:Cookies
|
2117 | 2153 |
|
|
0 commit comments