-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
125 lines (93 loc) · 2.18 KB
/
Copy pathscript.js
File metadata and controls
125 lines (93 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// var a =12;
// let b = 13;
// sconst discount =100
// console.log(a)
// const { log } = require("node:console")
// types of console
// console.log("hi")
// console.info("hi")
// console.warn("hi")
// console.error("hi")
// console.table({name: "Aakash"})
// let nm = prompt("name ?")
// console.log(nm)
// DATA TYPES
// var a;
// console.log(a)
// var a = [1,2,3,4]
// var b=a;
// b.pop()
// console.log(b)
// let a = prompt("name ?")
// alert(`HEY ${a}`)
// let a = prompt() // Prompt se jo bhi lo ge wo 1 String ban jaye ga This is the problem in JS
// console.log(typeof a)
// let count = 5;
// console.log(count);
// count = count-- + 5;
// console.log(count);
// var hello;
// hello()
// var hello =function(){
// console.log("hi")
// }
// console.log(a)
// let a =12
// if(0){
// console.log("Hello")
// }
// else{
// console.log("bye")
// }
// var a = 112>13?console.log("ha bhai bada hai "):console.log("nahi bhai")
// switch(8){
// case 1 : console.log("hey");break;
// case 2 : console.log("hey hey ");break;
// case 3 : console.log("hey hey hey ");break;
// case 4 : console.log("hey hey hey hey ") ;break;
// case 5 : console.log("hey hey hey hey hey ");break;
// default: console.log("1-5 daal")
// }
// FOR Loops
// for(start;end;change)
// for(let i=2;i<33;i++){
// console.log(i)
// }
// for(let i=121; i>12;i--){
// console.log(i)
// }
// for(let i=12;i>0;i--){
// if(i===5 || i===7){}//bypass
// else console.log(i)
// }
// --- Recursion In JS
// function abcd(){
// console.log("hey")
// abcd()
// }
// abcd()
// Continue in JS
// for(let i=1;i<10;i++){
// if(i===5)continue;
// console.log(i)
// }
// function in JS
// function khanakhaao(){
// console.log("step 1")
// console.log("step 2")
// console.log("step 3")
// console.log("step 4")
// }
// khanakhaao()
// parameter in JS
// function doSomething(name, age, email){
// // console.log(name,age,email)
// console.log(arguments)
// }
// doSomething("Aakash",25,"aakash@gmial.com")
// variable hoisting
// a() // ayise use nahi kar sakte variable me
// var a = function(){
// }
// a()// ayise use kar sakte ha
// function a(){}