Implement a function slowLog
that takes a string and prints it to the console after a 3 sec delay
Use console.log
and setTimeout
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
helper.js
export const slowLog = (s) => {
console.log(s);
}
solution.js
/**
* Implement a function slowLog in helper.js that takes a string and prints it to the console after a 3 sec delay
*
* Use console.log and setTimeout
* */
import { slowLog } from './helper.js';
const lateString = 'This message should be delayed and printed after a 3 second delay';
slowLog(lateString);