Tagged: javascript

0

Determine if a number is Odd or not

Problem description : Write a method to determine the given number is odd or not. If it’s not a number then throw an error. Add this method as native javascript method. Input : A...

1

Fibonacci sum for the given number

Problem description : In mathematics, the Fibonacci numbers are the numbers in the following integer sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, … In mathematical terms, the...

0

Calculate the average of a nested array

Problem description: The following nested array contains some invalid entries (which are not numbers). We also want to filter those entries in our average calculation. var nestedArray = [ 1, 2, 3, [4, 5,...

0

Multi dimensional arrays in javascript

Problem description : The following function creates a 2-D array and initialize it with zeros. Find a bug in the code and propse a solution to it. The following gist shows the given code...

0

Random Dice Roll Challenge

Problem description : Write a javascript function that accepts a string argument in the format {digit}d{digit}; where The first digit represents the number of dices. The second digit represents the number of sides. The...

0

Fizz-Buzz challenge

Problem description : Write a function that prints the numbers from 1 to 100. But for multiples of three prints Fizz instead of the number and for the multiples of five prints Buzz. For...

Show Buttons
Hide Buttons