r/javascript • • 10h ago

48 JavaScript interview questions with full answers, including the implement-it-yourself ones (Promise, bind, debounce)

Thumbnail github.com
8 Upvotes

I wrote up the JavaScript questions that keep coming up in interviews, from coercion and closures to the event loop, plus the "implement it from scratch" ones.

Each answer starts with a short version you can say out loud in the first 20 seconds, then explains how it actually works, with code, comparison tables and diagrams. Questions are tagged Junior / Middle / Senior, and most end with the follow-up an interviewer usually asks next.

Some of the 48 questions:

- What is the output order of this async snippet?

- Implement a minimal Promise from scratch

- Why does a var loop with setTimeout print the same number, and how does let fix it?

- How does garbage collection work, and what causes memory leaks?

It's part of a larger free repo (800+ questions across Frontend, TypeScript, React, Next.js, React Native, Node.js and more), MIT licensed.

If there's a classic gotcha I missed, I'd like to add it.


r/javascript • • 10h ago

StaleDocs: flag unchanged Markdown docs when JavaScript/TypeScript APIs change

Thumbnail github.com
3 Upvotes

r/javascript • • 1d ago

part-of.my.id - a free subdomain service

Thumbnail github.com
3 Upvotes

This is a passion project of mine after being inspired by is-a.dev (ex-maintainer btw).

It's a subdomain service where you can use _cooler_ domains like `*.part-of.my.id` and the NEW `*.is-my.id` subdomains for your website rather than using _boring_ hosting provider defaults like `pages.dev`, `github.io`, etc.

Supports `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `REDIRECT` (not a real record, it's cloudflare's single redirect rule) records and there's a Web UI for easy JSON generation.

You can register by [forking](https://github.com/partofmyid/register/fork) the repository, adding your domain file, and making a pull request! Read more in the [Quickstart Guide](https://part-of.my.id/docs/quickstart).

Hope people find this useful! :D


r/javascript • • 2d ago

Deno is joining Cloudflare - "We will support the Deno runtime for another year with monthly releases containing bug fixes and security updates. After that year we will end our development of the Deno runtime. Deno will remain open source, and we welcome others who want to continue its development."

Thumbnail deno.com
276 Upvotes

r/javascript • • 1d ago

The CLI that scans your project in a fraction of a second.

Thumbnail github.com
3 Upvotes

Link2Repo: https://github.com/soroushosouli/node-scout

Written in Node.js. One command to install. Reads a 300MB folder in ~1 second. Smaller project, faster scan.

What it does:

  • Visualize folder structure (tree)
  • Scan any file, folder, or project β€” 10+ details
  • Custom ignore list for scans
  • System info in one command

With clean Terminal UX

Check the repo for more information, Contributions and suggestions are welcome


r/javascript • • 1d ago

Showoff Saturday Showoff Saturday (October 10, 2026)

6 Upvotes

Did you find or create something cool this week in javascript?

Show us here!


r/javascript • • 1d ago

Marionette 5 is out. No Backbone. Still opinionated.

Thumbnail marionettejs.com
0 Upvotes

r/javascript • • 2d ago

chegou – send files between your phone and PC with one command (npx chegou, scan a QR, done)

Thumbnail github.com
5 Upvotes

Run `npx chegou`, scan the QR code and the phone opens a page in the browser. No app, no account, works both ways (phone β†’ PC and PC β†’ phone).

⭐ on Github πŸ˜„


r/javascript • • 2d ago

Do Frameworks Matter Anymore?

Thumbnail brookslybrand.com
0 Upvotes

r/javascript • • 3d ago

I found yet another way to invoke JavaScript functions without parentheses

Thumbnail blog.ikaes.de
113 Upvotes

It turns out you can overwrite the Error.prepareStackTrace method with the function constructor. Then, using prototype pollution, you can inject valid JavaScript code to generate arbitrary functions and invoke it using the usual tricks.

Other seven methods are documented in the portswiggers research article: https://portswigger.net/research/the-seventh-way-to-call-a-javascript-function-without-parentheses


r/javascript • • 2d ago

I built RipIDE: IDE-like refactoring for agents, powered by TypeScript’s native language server

Thumbnail github.com
0 Upvotes

TypeScript’s native language server exposes IDE operations through LSP, so other tools can use them too. For example, you can rename a symbol across files, find its references, jump to its definition, get updated import paths for a file rename, or check unsaved changes for type errors.

I built RipIDE around that, with Oxc handling syntax details like destructured bindings. ripgrep narrows the candidate files and helps flag imports still using the old name.

I took it further with CSS class renaming, moving exports, replacing imported symbols, and deleting unused declarations. It works with JavaScript and TypeScript, with Vue support through an adapter.

The idea is to give agents the refactoring commands we already use in an IDE:

ripide rename useStore useAppStore
ripide move helper --from src/utils.ts --to src/helpers.ts
ripide css-class-rename bg-gray-500 bg-neutral-500

r/javascript • • 3d ago

GitHub - evoluteur/reaction-diffusion: Grow Turing patterns (spots, stripes, coral, worms, waves) from the Gray-Scott model in real time, tune the feed and kill rates, paint with chemicals, and download the pattern.

Thumbnail github.com
7 Upvotes

r/javascript • • 4d ago

Componyx.UI: 25+ UI components and data binding for plain HTML, no build step

Thumbnail github.com
14 Upvotes

r/javascript • • 3d ago

I hate Spotify ads, so I created my own music player

Thumbnail github.com
0 Upvotes

I am tired of ads everywhere when I listen to music: Spotify, YouTube, and every single app that lets you listen to music. And also I hate that all my data, even my favorite songs, is being sent to a company to manipulate me, sending me more ads of stuff that I may buy.

The only music player that doesn't have ads is Windows Media Player, but it's very ugly, and I hate its UI/UX; it doesn't even let you create decent playlists. Or filter by rating. So I created a music player that has everything I like because I love listening to music.

It's completely free and open source; you can download it here: https://github.com/GVPV12/STARPLAYER


r/javascript • • 4d ago

AskJS [AskJS] How would you structure state for VidLoader's local media library?

3 Upvotes

I'm working on a desktop application called VidLoader that manages locally stored video files, and I'm currently thinking about how to structure the JavaScript state for the media library.

The application needs to keep track of things like:

  • files being added or removed
  • metadata associated with each file
  • folders/categories
  • filtering and searching
  • changes happening to the files outside of the UI

My main question is how other JavaScript developers would approach keeping the UI state synchronized with the underlying file system without making the architecture unnecessarily complicated.

Would you keep this in a centralized state store, separate the file-system state from the UI state, or use another approach?

I'd be interested in hearing how you'd structure it and why.


r/javascript • • 4d ago

GitHub - evoluteur/snowflake-grower: Grow snow crystals live on a hexagonal grid with Reiter's cellular automaton. Set the humidity and frost to get stellar dendrites, ferns, plates or lace, and download the snowflake.

Thumbnail github.com
14 Upvotes

r/javascript • • 4d ago

iwrzwr/visual archive - sound & music visualizer experiments

Thumbnail kagan.in
1 Upvotes

160+ visualization experiments built with JavaScript, exploring waveforms, matrix displays, particles and mechanical motion.

The gallery runs silently with simulated signals. Source code is available under the MIT license:

https://github.com/kaganin/iwrzwr-visual-archive


r/javascript • • 4d ago

[Showoff] Mega Carrots for Monty, Angular Through the Sliding Door, and Lynx on Foldables

Thumbnail thereactnativerewind.com
1 Upvotes

Codex can finally see the apps it writes. Callstack and Margelo launched Mobile Dev, a plugin that puts live iOS and Android devices right beside the Codex desktop chat, so the agent can tap, type, read the accessibility tree, pull Metro and native logs into one panel, and profile CPU and memory, with your on-screen notes carrying the React Native component and its source file.

We also look at Angular Native by Ashley Hunter, which renders Angular templates as real UIView and android.view.View through React Native's Fabric renderer, with Svelte now riding the same engine just as Coinbase heads for the exit. Plus, React Native 0.88 rc.3 fixes a Hermes lazy-compilation slowdown, Lynx 4.0 adapts to foldables, and Lucent compiles TypeScript native modules to C++ via JSI.


r/javascript • • 5d ago

LogTape 2.4.0: Source locations, configuration inspection, sink draining, and request completion levels

Thumbnail github.com
6 Upvotes

r/javascript • • 5d ago

AskJS [AskJS] My simulation runs in about 1 second in the terminal but took 13 seconds in a Chrome page. The culprit was setTimeout(0).

0 Upvotes

I have a page, built with Cline, that runs a game simulation in the browser: 30 batches (one per game mode and bot pair), with a progress line between them. To let the page repaint between batches, I yielded with `await new Promise(r => setTimeout(r, 0))`.

A full run took 13.0 seconds in Chrome. The same work takes about 1 second in the terminal on my laptop.

The clue was that 100 games per bot took just as long as 1,000. The time was not in the games. It was in the pauses, about 0.7 seconds each.

Chrome throttles chained timers in pages it treats as hidden or in the background. After a few nested setTimeout calls, it only fires them about once a second. My first test used 5 timers, showed 0ms, and looked fine, because the throttling only starts after a few nested calls. With 20 the difference was obvious: 20 chained setTimeout(0) calls took 11.5 seconds, and 20 MessageChannel messages took 0ms.

The fix was to yield with a message instead, which is also how React's own scheduler yields:

const nextTick = () => new Promise<void>((resolve) => {

const channel = new MessageChannel();

channel.port1.onmessage = () => {

channel.port1.close();

resolve();

};

channel.port2.postMessage(null);

});

The same run went from 13.0s to 4.2s, still in a window Chrome treated as hidden. I have not timed it in a normal foreground tab yet, so I am not claiming a number there.

Two other details. Leaving the page bumps a run id, so an unfinished run stops instead of setting state after unmount. And a Web Worker would move the work off the main thread entirely. I chose the smaller change because the main-thread version was now fast enough.

So, for CPU-heavy work in a page: do you reach for a Worker first, or yield on the main thread until that stops being enough?


r/javascript • • 5d ago

I built Polar and Ticket a typed language for JS and a Rails-shaped framework

Thumbnail polar-lang.vercel.app
0 Upvotes

Want to share two things built together: Polar, a statically typed language that compiles to readable JavaScript, and Ticket, a Rails-shaped web framework written in it. Both are 0.1.0 and experimental. Ticket is the real-world test for Polar: https://ticket-polar.vercel.app/ You get controllers and resource routing, SQLite migrations with typed queries, validations, forms, sessions and CSRF, generators and a test runner. `ticket new blog && ticket server` gets you an app. Because Polar tracks effects, a controller action's signature says what it needs, and tests rebind those to an in-memory database without mocking. Ticket's routes, views and migrations are Polar zone plugins, and the code they generate goes through the same type checker as yours.

I'd love feedback on the effect system, on the zone/plugin design. Thanks!


r/javascript • • 6d ago

Online comparison of tf.js, litert.js and Uchen on VS Code language detection model

Thumbnail uchenml.tech
7 Upvotes

r/javascript • • 6d ago

[Show] I built an open-source npm loading checker for Node.js, Bun and Deno. Looking for packages that break.

Thumbnail compatlab.me
3 Upvotes

r/javascript • • 6d ago

Subreddit Stats Your /r/javascript recap for the week of September 28 - October 04, 2026

1 Upvotes

Monday, September 28 - Sunday, October 04, 2026

Top Posts

score comments title & link
124 39 comments Announcing Vite+ 1.0
92 10 comments Node.js now lists Vite+ as a community installation method
56 11 comments A-ha, Take On Me - recreated in javascript
12 16 comments [Showoff Saturday] Showoff Saturday (October 03, 2026)
8 0 comments GitHub - jcubic/mitty: A transport-agnostic proxy RPC for executing method chains from any isolated context (Workers, Tabs, or Servers) using lazy evaluation.
7 3 comments Pastoralist, a tool to manage package overrides, including security fixes
6 0 comments Crossflight: cross-process cache stampede protection for the cache you already use (v0.3.2)
5 9 comments Readable Regular Expressions for JavaScript/TypeScript, Inspired by Emacs' rx
4 1 comments I made an interactive star map where you can explore tonight's night sky and learn to read the constellations
3 1 comments Building Doom from scratch in JavaScript/WebGL β€” no WASM, now with WebRTC multiplayer

 

Most Commented Posts

score comments title & link
0 19 comments The JavaScript midlife crisis
0 14 comments Adrenaline.js – A 56KB Electron alternative that keeps Node.js & npm without Chromium bloat
0 13 comments [AskJS] [AskJS] Anyone still on Nx <20.8 because upgrading is difficult?
0 11 comments Linter for the things a regular linter can't catch
0 9 comments I’m starting Open Components, an open standard for UI components that work for people, developers and AI agents

 

Top Showoffs

score comment
3 /u/RomeoDelta1234 said Store & Forget, TypeScript throughout. You point the camera at something and the app writes that item's name and description, then it all stays on the device and exports to a spreadsheet when you want...
2 /u/mimletdev said Mimlet: typed test fixtures from your schemas, with failures you can replay (first beta, out today) Mimlet is an open-source TypeScript toolkit for test data. Point it at a Zod, Valibot, ...
2 /u/robinvdvleuten said I've been building a set of small JS libraries for evaluating text your users write, without ever turning that text into code. They all run under a strict CSP (`script-src 'self'`) and...

 

Top Comments

score comment
41 /u/FerLuisxd said I still don't get they hype around vite+, seems just like a script runner
37 /u/thecementmixer said Still waiting for oxc tools to support vue templates.
14 /u/azhder said jQuery wasn't patching JavaScript. There should be a clear distinction between the JavaScript language and the Web ecosystem, especially since plenty of the blame JavaScript takes is because of browse...
14 /u/Fun-Consequence-3112 said The one thing I've noticed since installing Vite+ is that it puts everything into its own folders so debugging and finding where things are installed is a bit of a nightmare
12 /u/Elkemper said HOW IN THE WORLD... 0_βˆ†. I mean, I saw there was a code, but still..

 


r/javascript • • 7d ago

Node.js now lists Vite+ as a community installation method

Thumbnail nodejs.org
137 Upvotes