Is there a website that clearly shows Javascript Syntax?

I am wanting a reference page that could be used as a refresher that would show the best way to write out an object, function, array, etc. Ideally a minimal one-stop page that would show me what these things should look like and not so much an explanation as to what they are.

Additionally if it could have the proper names for everything that would be beneficial (key/property rather than foo/bar).

I find my mistakes have mostly been with mixing up bracket types, misuse of semicolons, etc.

Thanks in advance!

I’m not totally clear on what you are asking for.

Would the MDN JavaScript Reference be what you’re looking for?

If you just want a simple reference like:

Arrays = [] // Square brackets
Objects = { key: value } // Curly braces, key/value pairs
...

It may just be easier to make your own whenever you find something you frequently get confused by, possibly as an Anki flashcard set for revision.

2 Likes

Thanks, that reference does help. I was looking for something like http://www.json.org/

I actually ended up starting up on a ready through of You Don’t Know JS which I’ve found immensely helpful as it covers things in the detail I was looking for. I have done some programming in the past and found myself mixing up small things between languages. YDKJS is helping a lot on having a solid foundation.

Wow these diagrams are neat!

Someone once posted on gitter a diagram for the entire JS syntax, which was huge! I wish I saved a copy (though I bet it’s just one Google search away).