Timer
setTimeout()-Methode
setTimeout()-MethodesetTimeout(() => console.log('Here is your pizza 🍕'), 3000);Argumente mitgeben
setTimeout(
(ingredients, type) => {
console.log(
`Here is your ${type} with ${ingredients.join(' and ')} ${type === 'pizza' ? '🍕' : ''}`
);
},
3000,
['olives', 'spinach'],
'pizza'
);Timer abbrechen
setInterval()-Methode
setInterval()-MethodeLast updated