## Loop over an array with the given timeout for each element

Problem You are given an array of objects each with its name and timeout value. Iterate over each element inside an array in the interval of the given timeout. Solution We have to set...

Skip to content
# Category: Facebook

##
Loop over an array with the given timeout for each element

##
Create a bar chart from json

##
Pascals triangle javascript code

##
Implement a power function

Problem You are given an array of objects each with its name and timeout value. Iterate over each element inside an array in the interval of the given timeout. Solution We have to set...

Problem : Given a JSON data structure with key representing age and value representing the number of people with that age. For example, { 25: 55, 26: 45, 27: 10, 28: 20, 30: 1,...

Problem : Create a pascal’s triangle using javascript. More details about Pascal’s triangle pattern can be found here. Input: #Rows = 6 Output: Logic : Pascal’s triangle can be simulated using 2-D array While...

Naive logic: Loop through the number of times the exponent, and during each iteration multiply the base If our exponent is 10,000 then our loop has to run 10,000 times. But we can optimize...