8000 Revision of loops · anshi-the-coder/Javascript@3727281 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3727281

Browse files
Revision of loops
1 parent c17f603 commit 3727281

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Loop.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
let a = [3,2,1,34,5,7]
2+
for(let i =0;i<a.length;i++){
3+
console.log(a[i])
4+
}
5+
6+
a.forEach((element)=>{
7+
console.log(element*element)
8+
})
9+
10+
// Array.From
11+
12+
let name="Anshika"
13+
let arr= Array.from(name)
14+
console.log(arr)

0 commit comments

Comments
 (0)
0