javascript blogs

learn kro favicon img

JavaScript Interview Questions (Part-2)

1. The following recursive code will cause a stack overflow if the array list is too large. How can you fix this and still retain the recursive pattern?

Answer:The potential stack overflow can be avoided by modifying the nextListItem function as follows:

The stack overflow is eliminated because the event loop handles the recursion, not …

JavaScript Interview Questions (Part-2) Read More »

learn kro favicon img

10 Days of JavaScript HackerRank Challenges

Solve 10 Days of JavaScript HackerRank Problems Today we’ve solved several JavaScript coding interview problems from Here we’ve presented 10 of them. 1. Functions Problem:Implement a function named factorial that has one parameter: an integer, . It must return the value of (i.e., factorial). Solution: 2. Let and Const Problem:1. Declare a constant variable, PI, and …

10 Days of JavaScript HackerRank Challenges Read More »