Edit in JSFiddle

//passing setTimeout function a function
setTimeout(function () { 
    console.log('I waited roughly 2 seconds')
}, 2000);