Practice

 // Q1

const square=n=>(n*n);
console.log(square(6));


// Q2-to print 5 times in time interval 2 sec
let id=setInterval(()=>{console.log("hello wolrd!")},2000);
setTimeout(() => {
    clearInterval(id);
},10000);


Comments

Popular posts from this blog

Callback Hell

TODO list with DOM

Refactoring callback hell code