Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "i" of the for loop can be initialized with the value 2 #990

Open
ghost opened this issue Jan 31, 2023 · 10 comments
Open

The "i" of the for loop can be initialized with the value 2 #990

ghost opened this issue Jan 31, 2023 · 10 comments

Comments

@ghost
Copy link

ghost commented Jan 31, 2023

The "i" of the for loop can be initialized with the value 2

@BamaCharanChhandogi
Copy link

Hey! I am new to open source, I want to take up the issue can you please guide me a bit. Can you please assign me to this task.

@ShivamPandey00
Copy link

can you specify in which for loop the value of 'i' should be 2 ?

@Skilly55
Copy link

for (var i = 2; i < 10; i++) {
console.log(i);
}

This for loop will start with i equal to 2, and will continue until i is less than 10. On each iteration of the loop, the value of i will be logged to the console.

@BamaCharanChhandogi
Copy link

@phcmiguez hey i want to contribute to this project.

@Dumte
Copy link

Dumte commented Feb 16, 2023

Can I declare my variable before the for loop statement?

@PrakarshSingh5
Copy link

yes you can

@Ahamdzia
Copy link

Hey yes you can declare it as an I or as any other name but as we have studied was always I and one thing more you can give any value to it ,

Repository owner deleted a comment Apr 9, 2023
Repository owner deleted a comment Apr 9, 2023
@utkarsh-shrivastav77
Copy link

Hey, is this issue still opened

@pasan2002
Copy link

You can initalize i value with 2. If you initialize I with 2 then the loop will start with the i value of 2.

If you use for loop like this ,

for (var i = 2; i < 50; i++) { console.log[i] }

you get all the number from 2 to 49.

@miladhatami1393
Copy link

can you specify in which for loop the value of 'i' should be 2 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants