-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththird.js
More file actions
37 lines (31 loc) · 677 Bytes
/
third.js
File metadata and controls
37 lines (31 loc) · 677 Bytes
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
// infinite loop
/**
let m = 11 // start
while ( m > 10 ) // stop
{
console.log( m )
m++
}
*/
// coding example
// gbas gbos gbasgbos
// 1 to 1000
for( let i = 0; i < 100; i++) {
console.log(i)
// if ( i % 3 == 0) {
// console.log( `${i} is Gbas`)
// }
// if ( i % 5 == 0) {
// console.log( `${i} is Gbos`)
// }
if ( i % 3 == 0 && i % 5 == 0 ) {
console.log( `${i} is GbasGbos`)
}
else if ( i % 3 == 0) {
console.log( `${i} is Gbas`)
}
else if ( i % 5 == 0) {
console.log( `${i} is Gbos`) // string literals
console.log( i + " is Gbos" )
}
}