Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
<html>
<head>
<title>Array opdracht</title>
</head>
<body>
<h2>1. Array van Getallen </h2>
<p id="getallenArray"></p>
<script>
/* let showThis = document.getElementById('showThis');
let mijnArray =[];
mijnArray.push(1);
mijnArray.push(2);
mijnArray.push(3);
mijnArray.push(4);
mijnArray.push(5);
mijnArray.push(6);
let text = "";
for (var i = 0; i < mijnArray.length; i++) {
text += "index " + i + " value " + mijnArray[i] + "<br>";
}
showThis.innerHTML = text;
*/
let getallenArray = document.getElementById('getallenArray');
let mijnArray =[
1,
2,
3,
4,
5,
6
];
let text = "";
for (var i = 0; i < mijnArray.length; i++) {
text += mijnArray[i] + "<br>";
}
getallenArray.innerHTML = text;
</script>
<h2>2. Array van Gerechten</h2>
<p id="gerechtenArray">placeholder!</p>
<script>
let gerechtenArray = document.getElementById('gerechtenArray');
let mijnArray2=[
"Biefstuk met patat",
"Hutspot met rookworst",
"Tournedos met compot van wortel's",
"Hamburger met een frisse salade"
];
let text2 = "";
for (var i = 0; i < mijnArray2.length; i++) {
text2 += mijnArray2[i] + "<br>";
}
gerechtenArray.innerHTML = text2;
</script>
<h2>3. Array van strings en getallen</h2>
<p id="overigeArray">placeholder!</p>
<h2>4. Voeg 3 elementen toe aan de Array.</h2>
<p id="overigeArray2">placeholder!</p>
<h2>5. Verander de eerste paar elementen.</h2>
<p id=overigeArray3>placeholder!</p>
<script>
let overigeArray = document.getElementById('overigeArray');
let mijnArray3=[
"Zie hier de gegevens van Klaas",
"Geboortedatum " + 9 + " April " + 1990,
"Leeftijd " + 17,
"Woont in Haarlem",
"Is een programeur en kent de talen",
"JS",
"HTML",
"CSS",
"PHP",
];
let text3 = "";
for (var i = 0; i < mijnArray3.length; i++) {
text3 += mijnArray3[i] + "<br>";
}
overigeArray.innerHTML = text3;
// Hieronder staat de code voor het toevoegen aan een Array.
mijnArray3[9] = ("Vind games leuk!");
mijnArray3[10] = ("Heeft een PS4");
mijnArray3[11] = ("en is er eigenlijk heel erg slecht in")
let text4 = "";
for (var i = 0; i < mijnArray3.length; i++) {
text4 += mijnArray3[i] + "<br>";
}
overigeArray2.innerHTML = text4;
mijnArray3[0] = ("Hier zie je de gegevens van Gerrit");
mijnArray3[1] = ("Geboortedatum " + 15 + " Mei " + 2001);
mijnArray3[2] = ("Leeftijd " + 21);
let text5 = "";
for (var i = 0; i < mijnArray3.length; i++) {
text5 += mijnArray3[i] + "<br>";
}
overigeArray3.innerHTML = text5;
</script>
</body>
</html>
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team