This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"tijd": "13 Jan 2021 15:00", | |
"tempBuiten": 5, | |
"tempBinnen": 18, | |
"tempGewenst": 19, | |
"lichtKamer": false, | |
"lichtBuiten": false | |
},{ | |
"tijd": "13 Jan 2021 15:10", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const steden = ['Emmen', 'Amersfoort', 'Alkmaar', 'IJmuiden', 'Hilversum', 'Zaandam', 'Hoofddorp', 'Hoorn', 'Medemblik', 'Leiden', 'Almere'] | |
document.body.innerHTML = '<h1>Steden</h1>'; | |
// forEach - lus | |
steden.forEach(stad => { | |
document.body.innerHTML += stad; | |
document.body.innerHTML += '<br>'; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// een gebruikelijke notatie | |
function schrijfInBody(string) { | |
let tekst; | |
if( string ) { // ga na of er een argument is meegegeven | |
tekst = string; | |
} else { | |
tekst = "Dit komt van de functie schrijfInBody"; | |
} | |
document.body.innerHTML = tekst; | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Een JS-object dat alle energie-data van het huis bevat | |
const energieData = [ | |
{ | |
tijd: Date.parse('13 Jan 2021 15:30'), | |
tempBuiten: 5, | |
tempBinnen: 19, | |
tempGewenst: 19, | |
lichtKamer: false, | |
lichtBuiten: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gegevens opslaan | |
localStorage.setItem('opleiding', 'mediadeveloper aan Mediacollege Amsterdam'); | |
// gegevens ophalen | |
let gegevens = localStorage.getItem('opleiding'); | |
console.log(gegevens); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const docent = { | |
voornaam: "Theo", | |
achternaam: "den Blanken", | |
site: "https://blanken5.home.xs4all.nl/", | |
geboortejaar: 1956, | |
stelJeVoor() { | |
console.log(`Hallo in ben ${this.voornaam} ${this.achternaam}`) | |
}, | |
geefLes() { | |
window.location.href = this.site; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = () => { | |
if(xhr.readyState == 4 && xhr.status ==200) { | |
let resultaat = JSON.parse(xhr.responseText); | |
console.log(resultaat); | |
} | |
} | |
xhr.open('GET', 'boeken.json', true); | |
xhr.send(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"titel": "Wegen naar menselijkheid", | |
"cover": "https://media.s-bol.com/998W66G1KnLY/550x641.jpg", | |
"auteurs": [ | |
{ | |
"voornaam": "Eugen", | |
"achternaam": "Drewermann" | |
} | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.knoppen { | |
display: grid; | |
grid-gap: 1em; | |
grid-template-rows: repeat(auto-fill, 2em); | |
width: 7em; | |
margin: 0 .5em; | |
&--horizontaal { | |
width: 100%; | |
grid-template-columns: repeat(auto-fill, minmax(7em, auto)) | |
} |
NewerOlder