Skip to content

rohit-bharmal/JS-Learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

JS-Practice

100 JavaScript coding questions


πŸ”° Beginner Level (1-20) – Fundamentals

  1. Write a function to reverse a string.
  2. Check if a string is a palindrome.
  3. Count the number of vowels in a string.
  4. Find the factorial of a number.
  5. Check if a number is prime.
  6. Print Fibonacci sequence up to n terms.
  7. Write a function to find the largest number in an array.
  8. Write a function to remove duplicates from an array.
  9. Check if two strings are anagrams.
  10. Return the sum of all even numbers in an array.
  11. Capitalize the first letter of every word in a sentence.
  12. Write a custom implementation of .map().
  13. Write a function that flattens a nested array.
  14. Implement a debounce function.
  15. Implement a throttle function.
  16. Write a function to check if an object is empty.
  17. Convert an object to an array of key-value pairs.
  18. Write a function to find the intersection of two arrays.
  19. Write a function to count the frequency of elements in an array.
  20. Write a function that returns the longest word in a sentence.

🧠 Intermediate Level (21-50) – Logic + Core Concepts

  1. Create a function that deep clones an object.
  2. Implement a function that checks deep equality.
  3. Implement a basic memoization function.
  4. Write a function to group objects by a key.
  5. Implement a curry function.
  6. Write your own version of bind.
  7. Simulate the new keyword in JS.
  8. Simulate the instanceof operator.
  9. Create a polyfill for Array.prototype.reduce.
  10. Implement a simple promise-like structure.
  11. Compose multiple functions together.
  12. Write a custom event emitter (Pub/Sub).
  13. Write a function to shuffle an array (Fisher-Yates).
  14. Implement a binary search algorithm.
  15. Write a function to find the nth largest number in an array.
  16. Implement a function that returns all permutations of a string.
  17. Implement once() function (executes only once).
  18. Convert Roman numerals to integers.
  19. Evaluate a simple mathematical expression string (e.g. "2 + 3 * 4").
  20. Implement a basic LRU cache.

πŸ” Recursion + Algorithms (51–70)

  1. Generate all combinations of balanced parentheses.
  2. Solve the Tower of Hanoi.
  3. Find all subsets (power set) of an array.
  4. Implement merge sort.
  5. Implement quick sort.
  6. Implement binary search recursively.
  7. Find the lowest common ancestor in a binary tree.
  8. Serialize and deserialize a binary tree.
  9. Solve N-Queens problem.
  10. Check if a string has valid parentheses using stack.
  11. Count unique paths in a grid (dynamic programming).
  12. Find the longest common prefix among an array of strings.
  13. Implement a Trie data structure.
  14. Implement BFS and DFS on a graph.
  15. Check if a graph is cyclic.
  16. Detect if a number is a happy number.
  17. Find the first non-repeating character in a string.
  18. Implement Kadane's Algorithm.
  19. Solve the coin change problem.
  20. Find the longest increasing subsequence.

🧰 Data Structures in JS (71–80)

  1. Implement a stack using arrays and linked lists.
  2. Implement a queue using arrays and linked lists.
  3. Build a linked list from scratch.
  4. Implement a doubly linked list.
  5. Create a hash table (object-based).
  6. Implement a basic binary search tree.
  7. Write a min-heap / max-heap.
  8. Create a priority queue.
  9. Build a graph using adjacency list.
  10. Design and implement a Set class with union, intersection, and difference.

πŸ’‘ Advanced + JavaScript Specific (81–90)

  1. Explain and implement closures in various examples.
  2. Simulate call, apply, and bind.
  3. Create your own async/await with generators.
  4. Implement a retry mechanism for async functions.
  5. Debounce vs Throttle – build both with UI.
  6. Simulate JavaScript’s event loop and microtask queue.
  7. Create a virtual DOM and diffing algorithm (simplified).
  8. Implement a mini state management system (like Redux).
  9. Write a basic templating engine.
  10. Build a basic reactive system (like Vue's reactivity core).

🌐 DOM + Browser (91–95)

  1. Implement a modal popup from scratch.
  2. Build a simple image slider.
  3. Create an infinite scroll.
  4. Make a to-do list with localStorage.
  5. Build a drag-and-drop list.

🌍 Projects/Mini-Apps (96–100)

  1. Build a calculator with keyboard support.
  2. Build a stopwatch/timer.
  3. Create a quiz app with score tracking.
  4. Build a weather app using any API.
  5. Create a Markdown previewer.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published