Welcome — this repository is a personal collection of JavaScript exercises, notes, and small browser demos I made while learning core JavaScript concepts. It's organized by topic so you can find short examples, interview-style questions, and runnable snippets quickly.
- Primary language: JavaScript
- Secondary: HTML, CSS (small demos)
- No external dependencies or build tools detected (no package.json)
This is a short, annotated tree of the important files and folders in this repo:
Call, apply & bind/ - call/apply/bind examples + polyfills and prediction tests
Closures/ - Questions.txt and closure.js examples
Currying/ - currying examples
DOM_JS/ - browser demos (DOM_JS/index.html, script.js, button examples)
Debounce/ - debounce utilities / examples
Map,FIlter,Reduce/ - map/filter/reduce exercises (ArrayOfObjectQuestion.js)
Objects/ - object-focused examples (destructuring, deep/shallow copy, reference, etc.)
Promises/ - callbacks, promises, async/await examples and Questions.txt
Sheriyens_Interview_Question/ - interview-style question collection
this/ - examples showing `this` behavior
index.html - root HTML demo (static)
Many standalone .js files - small exercises and interview snippets (reverseString.js, missing-number.js, vowels.js, DecimalAddition.js, etc.)
README.md - (this file)
For more details about each folder, open the included Questions.txt files — they explain the exercise and expected behavior for many examples.
- Browser demo:
DOM_JS/index.html— open in a browser or use Live Server in VS Code. - Promises & async:
Promises/async_await.js,Promises/promise_combinators.js— run with node to see output. - Objects:
Objects/object.js,Objects/reference.js,Objects/DeepCopy.js,Objects/ShallowCopy.js— learn object behavior and copying. - Call / Apply / Bind:
Call, apply & bind/call.js,.../apply.js,.../bind.jsand their_polyfill.jsvariants — see implementations and effect onthis. - Closures:
Closures/closure.jsandClosures/Questions.txt— typical closure problems and explanations. - Array utilities:
Map,FIlter,Reduce/ArrayOfObjectQuestion.js,Map.js— practice functional array methods. - Small algorithmic exercises:
missing-number.js,reverseString.js,DecimalAddition.js,vowels.js— good for interview prep.
No build step required — most examples are single-file scripts or static HTML.
Clone the repo:
git clone https://github.com/shubhs12102005/Javascript.git
Open the browser demo:
- Open
DOM_JS/index.htmlin a browser or run a live server (VS Code Live Server recommended).
Run Node examples locally:
node Promises/async_await.js
node Objects/object.js
node missing-number.js
Tip: some small files are named with .js.js (e.g., Async_Await.js.js) — they are still plain JavaScript and can be run with node.
- Files are short, focused, and usually runnable directly with Node or the browser.
- Many folders include a
Questions.txtthat describes typical interview questions and the goal of the exercises — read those before running the scripts. - There is no package.json or test harness at the moment — everything is designed for local exploration.
If you'd like the repo to be easier to use by others, I can make one (tell me which):
- Add a
package.jsonwith convenience npm scripts, e.g.:
{
"name": "javascript-learning",
"scripts": {
"start:demo": "live-server DOM_JS",
"run:promises": "node Promises/async_await.js"
}
}- Move top-level loose
.jsexercises into topic folders (e.g., movereverseString.js,missing-number.jsinto analgorithms/folder) for clearer organization. - Add a
CONTRIBUTING.mdand small README inside large folders (Objects/, Promises/) with one-line run instructions.
This is a personal learning repository. Add a license if you want others to reuse the code (MIT is a common choice).
Happy learning — keep experimenting and committing small, focused examples. If you want, I can also:
- Add the
package.jsonand npm scripts described above, - Reorganize files into clearer topic folders,
- Add small README files inside high-level folders with one-line run instructions.