This code is working fine , but I need to add something in timeout function before return in firstFunction()
function LastFunction(){
var answer = firstFunction();
console.log(answer)
}
function firstFunction() {
//Do something;
return somevalue
}
How to add timeout function inside function before return value ?
function firstFunction() {
setTimeout (function(){
var something = "something here"
},1000)
return something
}