-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass8.js
28 lines (28 loc) · 944 Bytes
/
class8.js
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
// // loops
// // parenthesis 3 important part() initiallization,condition,incriment
// // (i = 0)is initiallization;(i < 10) is condition;(i++ ) is incriment, (i--) is decriment
// for(let i = 0;i<=1000;i++){
// console.log("HELLO WORLD",i);
// }
// loops homework
var table = 2;
var number = 21;
for (var i = 1; i > number; i++) {
console.log("".concat(table, " x "), i = table * i);
}
// Arrays
// 0 , 1 , 2 , 3
// let students_name=["Ali","Ahmed","Asif","Okasha"]
// console.log(students_name);
// element ko under bithalo magar akhir ma
// students_name.push("Anneq")
// console.log(students_name);
// akhiri elment ko bahar phenko
// students_name.pop()
// console.log(students_name);
// element ko under bithalo magar sab se agay
// students_name.unshift("Qasim")
// console.log(students_name);
// first elment ko bahar phenko
// students_name.shift()
// console.log(students_name);