What is the output of Loop 1? for (var i-0; i<5; i++) { console.log(i); console.log(i); When this runs, what will display?
What is the output of Loop 1? for (var i-0; i<5; i++) { console.log(i); console.log(i); When this runs, what will display?
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![What is the output of Loop 1?
for (var i-0; i<5; i++) {
console.log(i);
}
console.log(i);
When this runs, what will display?
O 012345
O 1234 error
O 12345
O 12345 error
Question 3
What is the output of Loop 2?
for (let i-0; i<5; i++) {
console.log(i);
console.log(i);
O 01234 error
O 012345
O 12345
O 12345 error
the differences between the code in Loop 1 and
Loop 2](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fc9283778-6719-43f5-b156-c4b2c0d2d01c%2F63d8fa7b-a8d4-4318-98da-466fbdfdd205%2Fom6fg44_processed.jpeg&w=3840&q=75)
Transcribed Image Text:What is the output of Loop 1?
for (var i-0; i<5; i++) {
console.log(i);
}
console.log(i);
When this runs, what will display?
O 012345
O 1234 error
O 12345
O 12345 error
Question 3
What is the output of Loop 2?
for (let i-0; i<5; i++) {
console.log(i);
console.log(i);
O 01234 error
O 012345
O 12345
O 12345 error
the differences between the code in Loop 1 and
Loop 2
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)