r/learnjavascript • • Aug 01 '20

Is this common Javascript? because I've just started learning JS and Web development and this Javascript syntax looks quite scary. Maybe it's just written messy, if it is just tell meπŸ˜…

Post image
208 Upvotes

105 comments sorted by

View all comments

170

u/LucVolders Aug 01 '20

To make things clear. You never write javascript this way. You write it in a normal style with commands on new lines all the time. Then when the code is finished and tested thoroughly you minify it. Then it looks like this. Minifying speeds processing up. You keep the original code for updates/changes/bugfixes.

8

u/StoneCypher Aug 01 '20

Yeah, this isn't minified. The labels are unchanged and everything has nine character names.

This is obfuscated. They're different.

This is easily reversed, but an unminifier won't succeed

0

u/[deleted] Aug 01 '20

[deleted]

1

u/StoneCypher Aug 01 '20

this produces larger source than the input, and is missing all basic minification steps other than whitespace removal. this is not minification