|
1 | | -# JavaScript-Course-2023 |
| 1 | + |
| 2 | +# JavaScript Full Course 2023 |
| 3 | + |
| 4 | +## Chapter 1 |
| 5 | + |
| 6 | +### Assignments |
| 7 | +**Question 1:** Difference Between "null" and "undefined" data type with example? |
| 8 | +**Question 2:** What type of variable should you **initialize** at the time of declaration? |
| 9 | +**Question 3:** Guess the **Output** and Explain Why? |
| 10 | +```js |
| 11 | +let languages = "java javaScript python cSharp"; |
| 12 | +let result = languages.lastIndexOf("S"); |
| 13 | +console.log(result) |
| 14 | +``` |
| 15 | +**Question 4:** Guess the **Output** and Explain Why? |
| 16 | + |
| 17 | +```js |
| 18 | +let variable = "hello programmers"; |
| 19 | +let result = Number(variable); |
| 20 | +console.log(result); |
| 21 | +``` |
| 22 | +**Question 5:** Guess the **Output** and Explain Why? |
| 23 | +```js |
| 24 | +let num1 = 32; |
| 25 | +let num2 = "32"; |
| 26 | +let result1 = num1 !== num2; |
| 27 | +let result2 = num1 != num2; |
| 28 | +console.log(result1,result2); |
| 29 | +``` |
| 30 | + |
| 31 | +**Question 6:** Guess the **Output** and explain Why? |
| 32 | +```js |
| 33 | +let str = "Hello Programmers"; |
| 34 | +let result = str.includes("r"); |
| 35 | +console.log(result); |
| 36 | +``` |
| 37 | +**Question 7:** Guess the **Output** and Explain Why? |
| 38 | + |
| 39 | +```js |
| 40 | +let num1 = 2; |
| 41 | +let num2 = 5; |
| 42 | +let result = num1**num2*2; |
| 43 | +console.log(result); |
| 44 | +``` |
| 45 | +**Question 8:** Guess the **Output** and Explain Why? |
| 46 | +```js |
| 47 | +let num1 = [1,2,4,5]; |
| 48 | +let num2 = [6,5,8,0]; |
| 49 | +let result = num1.concat(num2); |
| 50 | +console.log(result) |
| 51 | +``` |
| 52 | +**Question 9:** Guess the **Output** and Explain Why? |
| 53 | +```js |
| 54 | +let a = 5; |
| 55 | +let b = 7; |
| 56 | +let c = 8; |
| 57 | +let result = a<b>c; |
| 58 | +console.log(result) |
| 59 | +``` |
0 commit comments