Factorial and Sum of N numbers | Loops in Java Script | JS for Beginners - 20 | code io - Tamil

preview_player
Показать описание
In this video from the series of JS for Beginners, we will learn about What are the Loops in Java Script.

Follow us on
Instagram

LinkedIn
Рекомендации по теме
Комментарии
Автор

let n = 5;
let ans = 0;

for (let i = 1; i <= n; i++) {
ans += i;
}
console.log(`Sum of ${n} is: ${ans}`); //Sum of 5 is: 15

swbhndsolution
Автор

let n = 5 ;
let ans = 0;
for(let i = 1; i<=n;i++){
ans += i;
console.log(ans);
}

aravindraj
Автор

Bro java script series mudiya innum yevlav videos poduvinga bro totalah sollunga approximately

venkateshvenkat