r/learnjavascript • u/Pitiful_Decision1972 • Sep 28 '26
I built my own mathematics website from scratch.
[removed]
3
Upvotes
r/learnjavascript • u/Pitiful_Decision1972 • Sep 28 '26
[removed]
1
u/TheRNGuy Sep 30 '26 edited Sep 30 '26
I stead of generating html you could have html file and only add visible or hidden class to them.
Usd code block when posting here (triple ticks)
Better split it to many functions, it will be easier to test.
favoriteIdscan beSet.matchGradehas potential bug because of!!queryand||interaction, where it may always returnTruewhenFalseis expected (I think?)Start Boolean variables with
is,has(hasFoo,isBar, etc)Add comments to code, Make some expressions shorter (better have more lines but more readable code)
Add caching.