Found this beauty in one of my old projects from school

59 points · 8 comments · view on lemmy.world

8 Comments

python@programming.dev · 20 pts · 1y (1 reply)

smh, could have used the short form ()=>{ instead of function 😤

Deebster@programming.dev · 12 pts · 1y

I've been coding long enough that I still think of that as a fairly new thing in JS.

Rin@lemm.ee · 12 pts · 1y (1 reply)
[ removed ]
PoolloverNathan@programming.dev · 6 pts · 1y

Someone's handed me nested base-64 encoded JSON before and to this day I am moderately annoyed at them.

zygo_histo_morpheus@programming.dev · 11 pts · 1y

Why settle on cammel case ("saveGame") or upper cammel case ("SaveGame") when you can have one of each?

GBU_28@lemm.ee · 10 pts · 1y (2 replies)

I WILL NOT USE ANOTHER LINE. I DON'T NEED IT

SpicyLizards@reddthat.com · 5 pts · 1y (1 reply)

The best code has the fewest lines.

HelloHotel@lemmy.world · 1 pts · 1y

This is just as easy to write, just as sloppy but hopefully way easier to read.

Game.onload = (data)=>{
let a = data;
a = JSON.decode(a)["saveGame"][0];
a = JSON.decode(a)["SaveGame"];
return a;
}
Kissaki@programming.dev · 10 pts · 1y

In German we say "doppelt hält besser". Is there an English saying like that? "Twice is stronger/more stable/holds better."