denysdovhan / wtfjs

🤪 A list of funny and tricky JavaScript examples
http://bit.ly/wtfjavascript
Do What The F*ck You Want To Public License
34.75k stars 2.55k forks source link

Revert some formatting and errors in example code #176

Closed fireattack closed 3 years ago

fireattack commented 3 years ago

It looks to me at some point someone ran all the codes through a formatter (which added ";" to all the lines, removed extra spaces that are used to align comments, replaced all single quotes to double quotes, etc.). It went wrong (i.e. broke the code) at a few places, and argurably make the example harder to understand at some other places.

This commit does the following:

  1. Fix totally broken ones
  2. Revert some examples to its original form because they are meant to look obfuscated or other intended formatting to present the code in an easier to understand way

I didn't touch anything else (like the spaces to align comments or ";") but I'm honestly not sure if it's better than the original.

denysdovhan commented 3 years ago

Prettier doesn't seem to work reliably with such code :(

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 1.13.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: