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

-3

u/saito200 Aug 01 '20

This is minified javascript. Minification is a process to take a file written by a programmer and reduce its size as much as possible. In the case of a javascript file, it means removing any spaces and renaming all variables to shorter names. Reducing the size of a file is useful to send it through a network.

You will and should never code something that looks like that. Well, you would have a really bad time if you tried...

5

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.

2

u/saito200 Aug 01 '20

obfuscated

Is that a programming thing? I didn't know

-2

u/TijmenTij Aug 01 '20

Its basicly code that does nothing

1

u/[deleted] Aug 02 '20

Its code rewritten in a way that intentionally makes it hard to understand what the code is doing to make it harder to reuse in someone else's code base.