0

I have some callback function, but this dont work I dont understund why

const loading = () => {
  const callFalse = () => {
    return false;
  }
  const callTrue = () => {
    setTimeout(() => {
      callFalse()
    }, 5000)
    return true;
  }
  return callTrue();
}
console.log(loading())

Return only true. How fix this?

CertainPerformance
  • 356,069
  • 52
  • 309
  • 320
Кларк
  • 133
  • 6

0 Answers0