Skip to content

Commit f7733bb

Browse files
committed
10OnetoN
1 parent 4eb0890 commit f7733bb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Programs/DSA/oneton.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
3+
10. Print 1 to N in Js Function
4+
5+
6+
Input-5
7+
Output -1 2 3 4 5
8+
*/
9+
10+
11+
function onetoN(num){
12+
13+
for( let i=1;i<=num;i++){
14+
15+
console.log(i)
16+
}
17+
}
18+
19+
onetoN(5)// 1 2 3 4 5

0 commit comments

Comments
 (0)