r/learnjavascript 20h ago

I’m learning JavaScript in the AI era. What level of understanding is actually enough before building serious projects?

0 Upvotes

I’m learning JavaScript right now, and I’m trying to avoid two bad outcomes.

One is staying in tutorial mode forever because I feel like I need to understand every corner of the language before making anything real. The other is leaning on AI too early and ending up with projects that technically run but that I can’t debug, explain, or improve.

The kind of projects I want to build are not basic CRUD apps. I’m interested in three.js, frontend 3D rendering, data visualization, and coding based motion design. Think interactive web pages, visual experiments, small tools that explain something visually, maybe browser based creative projects where the interaction matters.

My question is: for someone aiming at that direction, what parts of JavaScript are still non negotiable in 2026?

I’m not asking whether AI can generate code. I know it can. What I’m trying to understand is where my own understanding has to be solid enough that AI becomes useful instead of dangerous.

For example, should I care more about:

  1. DOM, events, async, modules, and browser APIs
  2. Data structures, math, state, and performance
  3. Reading other people’s code and debugging broken output
  4. Building small complete projects without AI first
  5. Learning TypeScript early
  6. Understanding rendering concepts before touching three.js

If you were advising someone who wants to use JS as a base for 3D, visualization, and creative coding projects, what would you tell them to learn deeply, what would you let AI handle, and what would you not worry about until later?

I’d also love honest market advice. What separates someone who can make impressive AI assisted demos from someone who is actually useful on a real frontend or creative tech project?


r/learnjavascript 1h ago

Stuck at javascript

Upvotes

I want to learn mern stack and stuck at javascript tutorials please somebody help me ???


r/learnjavascript 3h ago

Can’t download break_infinity.js for some reason

0 Upvotes

I’m trying to use break_infinity.js for a game i’m making, but I can’t seem to download it. I’ve tried the actual github link and couldnt get it from there

https://github.com/Patashu/break_infinity.js/releases

Does anyone know where to get the latest version or what I might be doing wrong?


r/learnjavascript 22h ago

How to change a website page only at a specific time period

1 Upvotes

I wanna know how to change a website page to something different only at a specific time period (Changes at 12 am and then back to normal at 1 am)

This is the current code I have:

window.setInterval(function(){

var date = new Date();

var hours = date.getHours()

var minutes = date.getMinutes();

if (hours == 0o0 && minutes == 0o0){ //12:00 AM

window.location="secret page";

} else if(hours == 01 && minutes == 0o0){ //1:00 AM

window.location="original page";

}

}, 1000); //One second

So it technically works! But as soon as it changes to the secret page, it starts refreshing every second even when back to the original page. I know the problem is that it's running a page redirect every second, but is there anyway to not make it refresh constantly? Like it only redirects once but the code is still checking every second for when it changes back.

To clarify, I took this code snippet straight from a JavaScript forum post with the same question as me, this being the only answer I understood.


r/learnjavascript 13h ago

Performance Trap, some benchmarks and... subjective taste

4 Upvotes

I've done some benchmarks. ES5 vs ES6. What do you prefer? I ask this because I have often seen in other people's codes, where performance, optimization was required, ES6 code that decreased performance, which also had a negative impact on UI/UX.

This is more about the syntax used and not about which is faster.

Array size: 1,000,000 | Runs per test: 15

1. TRANSFORM — double 1,000,000 numbers

Test Avg (ms) Min (ms) Max (ms)
for loop (var, ES5) 0.733 0.6 1
array.map 5.447 4.7 6.9
forEach 5.96 5.4 6.8
for...of (ES6) 7.06 5.4 11.1

for loop (var, ES5) beat for...of (ES6) by 9.63x

2. FILTER — keep evens out of 1,000,000

Test Avg (ms) Min (ms) Max (ms)
for loop + push (ES5) 2.287 1.6 3.4
array.filter (ES6) 6.06 5.2 7.2

for loop + push (ES5) beat array.filter (ES6) by 2.65x

3. SUM — add up 1,000,000 numbers

Test Avg (ms) Min (ms) Max (ms)
for loop (var, ES5) 0.76 0.6 1.1
for...of 3.833 3.7 4.4
array.reduce 4.573 4.4 4.7

for loop (var, ES5) beat array.reduce by 6.02x

4. LOOKUP — find one value (worst case)

Test Avg (ms) Min (ms) Max (ms)
Set.has — O(1) 0 0 0
array.includes — O(n) 0.073 0 0.1
array.indexOf !== -1 — O(n) 0.073 0 0.2

Set.has — O(1) beat array.indexOf !== -1 — O(n)

5. STRINGS — build 200,000 strings

Test Avg (ms) Min (ms) Max (ms)
concatenation "+" 3.887 3.3 7.8
template literal ${} 3.9 3.5 4.3

concatenation "+" beat template literal ${} by 1.00x

6. OBJECT ITERATION — sum 50,000 values

Test Avg (ms) Min (ms) Max (ms)
for...in 4.273 4 4.6
Object.keys + forEach 4.38 4.2 4.7
Object.values + reduce 6.5 6 9.2

for...in beat Object.values + reduce by 1.52x

7. ARRAY CREATION — build 1,000,000 squares

Test Avg (ms) Min (ms) Max (ms)
for loop + push (ES5) 8.173 6.5 23.4
new Array(n).fill(0).map() 17.3 9 42.4
Array.from({length}, fn) 21.74 20.6 23.2

for loop + push (ES5) beat Array.from({length}, fn) by 2.66x

What do you prefer?