yutakahoulette-zz / frontend-interview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Common frontend JS interview questions

From performancejs.com.

Easy:

  1. ✔️ isPrime - Returns true or false, indicating whether the given number is prime.
  2. ✔️ factorial - Returns a number that is the factorial of the given number.
  3. ✔️ fib - Returns the nth Fibonacci number.
  4. ✔️ isSorted - Returns true or false, indicating whether the given array of numbers is sorted.
  5. ✔️ filter - Implement the filter function.
  6. ✔️ reduce - Implement the reduce function.
  7. ✔️ reverse - Reverses the given string (yes, using the built in reverse function is cheating).
  8. ✔️ indexOf - Implement the indexOf function for arrays.
  9. ✔️ isPalindrome - Return true or false indicating whether the given string is a plaindrone (case and space insensitive).
  10. ✔️ missing - Takes an unsorted array of unique numbers (ie. no repeats) from 1 through some number n, and returns the missing number in the sequence (there are either no missing numbers, or exactly one missing number). Can you do it in O(N) time? Hint: There’s a clever formula you can use.
  11. ✔️ isBalanced - Takes a string and returns true or false indicating whether its curly braces are balanced.

About


Languages

Language:JavaScript 100.0%