r/learnjavascript • • Jan 12 '21

JavaScript Cheat Sheet.

Post image
1.0k Upvotes

24 comments sorted by

34

u/Harbltron Jan 12 '21

I'm going to get this sucker printed and laminated, damn.

69

u/UserNotSpecified Jan 12 '21

Think I’ve found a slightly higher res version here. There appears to be a second page of them as well. https://alansimpson.me/javascript/infographics/codemio/codemio01.png

https://alansimpson.me/javascript/infographics/codemio/codemio02.png

18

u/iamrasul Jan 12 '21

Just wanted to say, that they missed the most important JS stuff - Object. But it turns out they wrote it down on the second page :)

4

u/UserNotSpecified Jan 12 '21

Oh yeah I didn’t notice that! It looks like there’s also some HTML and CSS guides made by the same creator if you’re interested (or anyone else is).

1

u/raendrop Jan 12 '21

Am I the only one who can't see the difference between "argument optional" and "argument required"?

0

u/[deleted] Jan 12 '21

[deleted]

1

u/UserNotSpecified Jan 12 '21

My pleasure! Thank you for the wholesome award!

3

u/_Invictuz Jan 12 '21

Get it tattooed! One page per arm.

9

u/Mr_82 Jan 12 '21 edited Jan 12 '21

I really like this. Because God do I hate looking up functions, and often prefer to write looping constructs which would be less succinct.

I know there are other resources, and know this will be unpopular, but I really blame the MDN/Mozilla here, though I really do want to like them. Their resources are just terrible. You can be both formal/technical and good pedagogically (or informal and bad pedagogically) but MDN resources are horrible at both. (Well, originally meant to say they come across as technically formal, but they don't use formality in the right way. Eg talking about the thisValue parameter for .apply, they reference two synonymous terms for "calling object," and it's just superfluous when you're not actually having issues with those terms in the first place. Most of their formality is fluff or pretension frankly.)

I Looked up .apply the other day responding to a post here and MDN was nearly objectively terrible at explaining the role of this function, particularly regarding the relevance of the "thisValue" argument. (Eg their examples, save one where they focused the discussion on something else entirely which is much simpler and didn't really warrant the discussion, all used trivial thisValue parameters; they didn't go into how "this" can be just like "null" or "undefined" as thisValue; didn't do anything too actually explain why you might want thisValue to be something non-trivial, ie what role thisValue actually serves as a parameter for .apply, etc) I was able to figure it out, mainly through testing things on my own, but yeah, I don't think there's been a single time I've felt I learned or better understood concepts after reading MDN's stuff, whereas there have been so many times when I've used another resource, thought back to MDN'S info on the matter, and reflected on how terrible it was, while trying to view MDN charitably.

1

u/JDDW Feb 22 '22

Care to share any of those helpful resources you like besides MDN? I'm studying for a bootcamp and sometimes find MDN confusing. Would be appreciated

6

u/Shty_Dev helpful Jan 12 '21

nice list, though i never used nor heard of Number.EPSILON... Also, maybe I am wrong but for a cheatsheet titled "language for the web" this should really include the most commonly used DOM methods

1

u/[deleted] Jan 12 '21

it will be nice

1

u/BreacherUp Jan 13 '21

Super handy reference, thank you

4

u/LokiiVegas Jan 12 '21

I'm gonna tattoo this onto myself

4

u/[deleted] Jan 13 '21

Hey an actual cheatsheet! Most "cheatsheet"s these days are blog posts that would be a dozen pages if you actually tried to print it

2

u/UltraMuchacho Jan 12 '21

why are there dots in front of the functions?

4

u/FreshPy Jan 12 '21

The function is being applied to the dataform left of the dot. Explanations for the symbols left of the dot can be found in lower right corner.

2

u/KhalifaAmin Jan 12 '21

Thank you dude im save it like my kid

1

u/zero-dinero Jan 12 '21

This is great. Thank you!

1

u/AnonyMustardGas34 Mar 15 '21

Object.keys()

Object.values()

Property in object

Casts:

parseInt()

parseFloat()

const unsigned = (num) => new UInt32Array(num)[0];

!!value