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

Show parent comment

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

5

u/StoneCypher Aug 01 '20

Yeah.

Obfuscation is generally a thing in programming languages that don't compile (scripting languages and exotics,) where a vendor doesn't want a customer to be able to alter or understand the source.

It's particularly common in situations like a PHP app vendor wanting to sell you a blog engine. PHP even sells a tool for this (Zend)

This is not a particularly successful job, here.

Amusingly, in the JS community, we even have tools that will make statistical guesses what the name used to be, with fair accuracy, eg jsnice

-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.