logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology See What Others Are Saying!
  • Question
  • How can you avoid callback hells ?


  • Correct Answer
  • There are lots of ways to solve the issue of callback hells: 1 Modularization: break callbacks into independent functions 2 Use a control flow library, like async 3 Use generators with Promises 4 Use async/await (note that it is only available in the latest v7 release and not in the LTS version) 

  • Tags: Analyst, IT Trainer

    More questions

    • 1. How can we find the number of rows in a result set using PHP?
    • Discuss
    • 2. What are the differences between GET and POST methods in form submitting?
    • Discuss
    • 3. How can we know the number of days between two given dates using php?
    • Discuss
    • 4. How to store the uploaded file to the final location?
    • Discuss
    • 5. Which function would you use to insert a record into a database?
    • Discuss
    • 6. What are the different functions in sorting an array?
    • Discuss
    • 7. How many types of Inheritances used in php and how we achieve it?
    • Discuss
    • 8. What is the difference between PHP and JavaScript?
    • Discuss
    • 9. Explain how to work with Permissions in PHP.
    • Discuss
    • 10. Explain how to send large amounts of emails with php.
    • Discuss


    Comments

    There are no comments.

Enter a new Comment