I would encourage anyone new to JavaScript to read the You Don’t Know JS book series. It has been very helpful for me in wrapping my head around JavaScript concepts and it’s free on GitHub.
Codepen Examples
- Number Weirdness
- Switch Statement
- Line endings
- Redeclaring Functions
- Hoisting
- Variable Scope – var, const, let
View the full Collection of pens on Codepen
Example Plugin
This is a basic WordPress plugin that shows how to enqueue JavaScript, and how to use React via @wordpress/element to render things.