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.

96

u/mypetocean Aug 01 '20

With variable names like Aakaanksha_0x5dbd and Aakaanksha_0x4082, this isn't minified β€” this is obfuscated.

This is done to hide the algorithm: common both in malware and in code which a company wants to try to protect for reasons of IP or pirating.

26

u/codecommentgold Aug 01 '20

Aakaanksha is a female Indian name.

40

u/alexxxor Aug 02 '20

I believe 0x5dbd and 0x4082 are popular surnames too.

8

u/ciaisi Aug 02 '20

Don't give Elon Musk any ideas