this post was submitted on 15 Nov 2024
53 points (94.9% liked)

Programming Horror

2020 readers
18 users here now

Welcome to Programming Horror!

This is a place to share strange or terrible code you come across.

For more general memes about programming there's also Programmer Humor.

Looking for mods. If youre interested in moderating the community feel free to dm @Ategon@programming.dev

Rules

Credits

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] SpicyLizards@reddthat.com 5 points 4 months ago (1 children)

The best code has the fewest lines.

[โ€“] HelloHotel@lemmy.world 1 points 2 months ago* (last edited 2 months ago)

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;
}