execute second function after second javascript code example Example: js after 1 second const now = new Date(); now.setSeconds(now.getSeconds() + 1)