// the function to be called function greeting(){ console.log('hello world!') }; // timer for function function run(){ greeting(); setTimeout(run, 3000); }