button :o
This commit is contained in:
15
index.html
15
index.html
@@ -31,8 +31,9 @@
|
|||||||
<p>Hi! My name is <mark>Caleb Fontenot.</mark> I am a software developer in my second semester at South Lousiana Community College.</p>
|
<p>Hi! My name is <mark>Caleb Fontenot.</mark> I am a software developer in my second semester at South Lousiana Community College.</p>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var array = new Array(10);
|
function main() {
|
||||||
|
var array = new Array(10);
|
||||||
|
|
||||||
for (let i = 0; i < array.length; ++i) {
|
for (let i = 0; i < array.length; ++i) {
|
||||||
let temp = parseInt(Math.random() * 100) + " array index: " + i;
|
let temp = parseInt(Math.random() * 100) + " array index: " + i;
|
||||||
array[i] = temp;
|
array[i] = temp;
|
||||||
@@ -51,12 +52,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < array.length; ++i) {
|
for (let i = 0; i < array.length; ++i) {
|
||||||
document.write(array[i] + "</br>");
|
document.getElementById("jsOutput").innerHTML += (array[i] + "</br>");
|
||||||
console.log(array[i]);
|
console.log(array[i]);
|
||||||
console.log(typeof(array[i]));
|
console.log(typeof(array[i]));
|
||||||
}
|
}
|
||||||
document.write("JavaScript is an absolutely bizarre language.");
|
document.getElementById("jsOutput").innerHTML += ("JavaScript is an absolutely bizarre language.");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<button class=button onclick="main()">Click me!</button>
|
||||||
|
|
||||||
|
<p id="jsOutput"></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://jigsaw.w3.org/css-validator/check/referer">
|
<a href="https://jigsaw.w3.org/css-validator/check/referer">
|
||||||
<img style="border:0;width:88px;height:31px"
|
<img style="border:0;width:88px;height:31px"
|
||||||
|
Reference in New Issue
Block a user