0% found this document useful (0 votes)
9 views

Questions On Js

Uploaded by

rajesh986009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Questions On Js

Uploaded by

rajesh986009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Certainly!

Here are some JavaScript questions that you can use to write programs
based on functions:

Reverse a String:
Write a function that takes a string as input and returns the string reversed.

Factorial Calculation:
Create a function to calculate the factorial of a given number.

Palindrome Checker:
Implement a function that checks whether a given word or phrase is a palindrome.

Find the Longest Word:


Write a function that takes a sentence as a parameter and returns the longest word
in it.

Sum of Array Elements:


Create a function that calculates the sum of all elements in an array.

FizzBuzz:
Implement a function that prints the numbers from 1 to 100. But for multiples of
three, print "Fizz" instead of the number, and for the multiples of five, print
"Buzz." For numbers that are multiples of both three and five, print "FizzBuzz."

Count Vowels:
Write a function that counts the number of vowels in a given string.

Find the Maximum Number:


Create a function that finds and returns the maximum number in an array.

Check Prime Number:


Implement a function that checks if a given number is a prime number.

Remove Duplicates:
Write a function that removes duplicate elements from an array.

Feel free to use these questions to practice your JavaScript programming skills! If
you have any specific requirements or if you'd like more questions, let me know.

You might also like