Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const greet = ({ name = 'Me' }) => console.log(`Hi ${ name }`);
- const repeat = (name, count = 0) => {
- if (count) {
- setTimeout(() => greet({ name }), 1000 * count);
- repeat(`${ name }.`, count - 1);
- }
- };
- repeat('Boris', 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement