0% found this document useful (0 votes)
46 views1 page

JavaScript For Loop Activity Guide

The document discusses an engagement activity where the reader is asked to analyze a JavaScript for loop program that outputs a list of car names. The reader is instructed to write the code, run it in a browser, and write their analysis in a provided text box.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views1 page

JavaScript For Loop Activity Guide

The document discusses an engagement activity where the reader is asked to analyze a JavaScript for loop program that outputs a list of car names. The reader is instructed to write the code, run it in a browser, and write their analysis in a provided text box.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lesson 5 – Engagement Activity

ENGAGEMENT
ENGAGEMENT ACTIVITY: Before going through the Javascript Looping, run and analyze
the program below. Open a Text Editor (notepad/Visual Studio Code/Sublime/Brackets) then
write the program below and save the file as “[Link]” and open the file in a browser.
Write your analyzation inside the box.

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript For Loop</h2>

<p id="demo"></p>

<script>
var cars = ["BMW", "Volvo", "Saab", "Ford", "Fiat", "Audi"];
var text = "";
var i;
for (i = 0; i < [Link]; i++) {
text += cars[i] + "<br>";
}
[Link]("demo").innerHTML = text;
</script>

</body>
</html>

It shows title JavaScript For Loop and under that title is a list of cars
BMW
Volvo
Ford
Fiat
Audi

Marawoy, Lipa City, Batangas 4217 | [Link]

You might also like