JavaScript Exercise #1

JavaScript is a programming language that can be embedded within HTML. It is the most-used programming language in the world.

Watch this video about the language.

Make a new folder called JavaScript1 and add an index.htm file that links to five examples, like this:

<html>
<h1> My Five JavaScript Programs </h1>
<h3> ______Put your name here________ </h3>
<hr>
<a href=7-1.html> Calculating a number and writing </a>
<br>
<a href=7-2.html> Find the minimum value </a>
<br>
<a href=7-3.html> Loop through an array and display with an ordered list </a>
<br>
etc.
</html>

Link to this index.htm file from your assignments page.

Implement these examples as 7-1.html, 7-2.html, 7-3.html, etc., and place in your JavaScript1 folder.

1) Calculating a number and output:

 

2) Find the minimum value:

3) Loop through an array and display with an ordered list:

4) Button and sorting an array (add a fruit):

5) Random number call: