Skip to content

A collection of JavaScript exercises and examples to master fundamentals like arrays, functions, and ES6 features. Perfect for beginners and intermediate learners

Notifications You must be signed in to change notification settings

hamzaAmjad5163/JavaScript-practise-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 JavaScript Practice Code

A collection of JavaScript exercises and examples to help you master the fundamentals, including arrays, functions, ES6 features, and more. Whether you're a beginner or an intermediate learner, this repository is the perfect place to practice and improve your JavaScript skills! πŸš€

This repository contains a structured collection of JavaScript files categorized into:

  • Array methods
  • DSA problem-solving
  • Web development concepts

It’s ideal for learners, job interview prep, or anyone revising core JavaScript logic and data structures.


πŸ“ Folder Structure

/Array Methods/

β”œβ”€β”€ Filter.js β”œβ”€β”€ Find-index-method.js β”œβ”€β”€ Find-max-min-value-in-array.js β”œβ”€β”€ Find-method.js β”œβ”€β”€ Flatten-Nested-Array.js β”œβ”€β”€ Map.js β”œβ”€β”€ Removing-Duplicate-from-array.js β”œβ”€β”€ Reverse-String.js β”œβ”€β”€ Sorting-Array.js β”œβ”€β”€ sum-all-element-array.js

/practise-questions-to-solve/

β”œβ”€β”€ 0 - 1-Knapsack-Problem.js β”œβ”€β”€ Anagram.js β”œβ”€β”€ Array-Duplicates.js β”œβ”€β”€ Array-Leaders.js β”œβ”€β”€ Array-Search.js β”œβ”€β”€ Array-Subset.js β”œβ”€β”€ BFS-of-graph.js β”œβ”€β”€ Binary-Search.js β”œβ”€β”€ Check-Equal-Arrays.js β”œβ”€β”€ Check-for-BST.js β”œβ”€β”€ Common-in-3-Sorted-Arrays.js β”œβ”€β”€ Count-Digits.js β”œβ”€β”€ Count-Inversions.js β”œβ”€β”€ Detect-Loop-in-linked-list.js β”œβ”€β”€ Directed-Graph-Cycle.js β”œβ”€β”€ Equilibrium-Point.js β”œβ”€β”€ Floor-in-a-Sorted-Array.js β”œβ”€β”€ indexes-of-Subarray-Sum.js β”œβ”€β”€ K-Sized-Subarray-Maximum.js β”œβ”€β”€ Kadane's-Algorithm.js β”œβ”€β”€ Kth-from-End-of-Linked-List.js β”œβ”€β”€ Kth-Smallest.js β”œβ”€β”€ Largest-Element-in-Array.js β”œβ”€β”€ Largest-subarray-with-0-sum.js β”œβ”€β”€ Left-View-of-Binary-Tree.js β”œβ”€β”€ Longest-Subarray-with-Sum-K.js β”œβ”€β”€ Majority-Element.js β”œβ”€β”€ Maximum-Product-Subarray.js β”œβ”€β”€ Minimize-the-Heights.js β”œβ”€β”€ Minimum-Jumps.js β”œβ”€β”€ Minimum-Platforms.js β”œβ”€β”€ Missing-And-Repeating.js β”œβ”€β”€ missing-number.js β”œβ”€β”€ Next-Greater-Element.js β”œβ”€β”€ Palindrome-String.js β”œβ”€β”€ Parenthesis-Checker.js β”œβ”€β”€ Peak-element.js β”œβ”€β”€ Perfect-Sum-Problem.js β”œβ”€β”€ Power-of-2.js β”œβ”€β”€ Prime-Number.js β”œβ”€β”€ Remove-loop-in-Linked-List.js β”œβ”€β”€ Reverse-a-String.js β”œβ”€β”€ Reverse-Words.js β”œβ”€β”€ Rotate-Array.js β”œβ”€β”€ second-largest.js β”œβ”€β”€ Smallest-Positive-Missing.js β”œβ”€β”€ Sort.js β”œβ”€β”€ Subset-Sum-Problem.js β”œβ”€β”€ Sum-of-Natural-Numbers.js β”œβ”€β”€ Top-View-of-Binary-Tree.js β”œβ”€β”€ Trapping-Rain-Water.js β”œβ”€β”€ Tree-Boundary-Traversal.js β”œβ”€β”€ Two-Sum-Pair-with-Given-Sum.js β”œβ”€β”€ Two-sum-Pairs-with-0-Sum.js β”œβ”€β”€ Undirected-Graph-Cycle.js β”œβ”€β”€ Union-of-2-Sorted-with-Duplicates.js β”œβ”€β”€ Union-of-Arrays-with-Duplicates.js β”œβ”€β”€ Middle-of-a-Linked-List.js β”œβ”€β”€ Frequencies-in-a-Limited-Array.js β”œβ”€β”€ Longest-Consecutive-Subsequence.js β”œβ”€β”€ Move-All-Zeroes-to-End.js β”œβ”€β”€ Palindrome-Linked-List.js β”œβ”€β”€ Min-and-Max-in-Array.js β”œβ”€β”€ Nth-Fibonacci-Number.js β”œβ”€β”€ Sorted-Array-Search.js β”œβ”€β”€ Rat-in-a-Maze-Problem-I.js β”œβ”€β”€ DFS-of-Graph.js β”œβ”€β”€ Linked-List-Insertion-At-End.js β”œβ”€β”€ K-th-element-of-two-Arrays.js β”œβ”€β”€ Reverse-a-linked-list.js β”œβ”€β”€ N-meetings-in-one-room.js β”œβ”€β”€ Reverse-array-in-groups.js β”œβ”€β”€ Fractional-Knapsack.js β”œβ”€β”€ Row-with-max-1s.js β”œβ”€β”€ Add-Number-Linked-Lists.js β”œβ”€β”€ Number-of-occurrence.js β”œβ”€β”€ Longest-Increasing-Subsequence.js β”œβ”€β”€ Diameter-of-a-Binary-Tree.js β”œβ”€β”€ Power-of-number.js β”œβ”€β”€ nCr.js β”œβ”€β”€ Find-triplets-with-zero-sum.js β”œβ”€β”€ The-Celebrity-Problem.js

/web-dev-js/

β”œβ”€β”€ Async-Await.js β”œβ”€β”€ Callback.js β”œβ”€β”€ Closure.js β”œβ”€β”€ Hoisting.js β”œβ”€β”€ IIFE.js β”œβ”€β”€ Promises.js β”œβ”€β”€ scope.js


πŸ” Topics Covered

Add these to help others find the repo via search and boost GitHub visibility:

  • JavaScript Array Methods (map, filter, reduce, sort, etc.)
  • DSA in JavaScript: Arrays, Strings, Trees, Graphs
  • JS Interview Preparation (functions, closures, hoisting, async/await)
  • Binary Search, Dynamic Programming, Sliding Window, Recursion
  • Web development JavaScript concepts
  • Pure JS problem solving with real interview questions

πŸš€ Getting Started

  1. Clone the repository:
    git clone https://github.com/yourusername/javascript-practice-code.git
  2. Navigate to the project folder:
    cd javascript-practice-code
  3. Explore the files and run the code!

🀝 Contribute

Want to add your own solutions or improvements? Contributions are welcome! Feel free to fork the repo, make changes, and submit a pull request.

About

A collection of JavaScript exercises and examples to master fundamentals like arrays, functions, and ES6 features. Perfect for beginners and intermediate learners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published