Important Notice:

The for Loop

The for Loop

36 views 1 min read

The for Loop (फॉर लूप)

हिंदी व्याख्या: for loop सबसे ज्यादा इस्तेमाल होने वाला लूप है। इसमें initialization, condition और increment/decrement एक ही जगह लिखा जाता है।

English Explanation: The for loop is the most commonly used loop. Initialization, condition, and increment are written in one place.

Syntax:

for (initialization; condition; increment/decrement) { // कोड यहां repeat होगा }

उदाहरण:

for (let i = 1; i <= 10; i++) { console.log("Number:", i); }
Output:-
Number: 1 Number: 2 Number: 3 Number: 4 Number: 5 Number: 6 Number: 7 Number: 8 Number: 9 Number: 10

 

Related Notes