JavaScript

I suggest you start by reading A re-introduction to JavaScript (JS Tutorial) - JavaScript | MDN which is a good start and introduction by Mozilla.

Microsoft have done a very good introductory series of videos, which you can get to from A new video series for beginners to learn JavaScript - Open Source Blog, so this is another good place to start.

Mozilla also provide a good starting point at JavaScript | MDN which I have found very helpful, however JavaScript reference - JavaScript | MDN is ideal for me as the language reference.

Another good place to look stuff up and learn is JavaScript Tutorial.

If you are writing a lot of JavaScript then consider using something like Use JSDoc to generate documentation.

A helpful explanation of var and let is available at Why You Shouldn’t Use ‘var’ Anymore.

7 JavaScript Concepts That Every Web Developer Should Know - GeeksforGeeks

If you have a variable called myVar and want to know what type it is then typeof myVar is a handy technique but not that arrays will be show as being objects. However it is sometimes note that simple, so Fixing the JavaScript typeof operator – JavaScript, JavaScript… helps with a more advanced solution.

Getting Started

There are basically two places to run JavaScript, inside a Web Browser or on a runtime like Node.js. Other options are Electron | Build cross-platform desktop apps with JavaScript, HTML, and CSS. and React Native · A framework for building native apps using React.

Consider not using "sloppy mode", see Sloppy mode - MDN Web Docs Glossary: Definitions of Web-related terms | MDN.

Node.js

When working with Node, it is best to install and manage it with nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.

With NVM installed you can then use various nvm commands as follows:

  • nvm install --lts - install latest LTS release
  • nvm ls --no-alias - list installed versions of Node, without "clutter"
  • nvm current - show the current version in use, will match node -v
  • nvm use 23.9.0 - switch current version to one specified, or nvm use --lts to use latest LTS available locally

Language

When declaring variables use let, or if appropriate use const but do not use the older var.

There is a good introduction to JavaScript at The Modern JavaScript Tutorial.

Other things to consider are strict mode, see Strict mode - JavaScript | MDN and TypeScript, see TypeScript: JavaScript With Syntax For Types..

Console

Almost everyone has done something like console.log('Here'), however we rarely think, "so what else can console do", well we should! Have a look at console - Web APIs | MDN because there is log, warn, error, group and table that can all be very useful.

Rhino

mozilla/rhino: Rhino is an open-source implementation of JavaScript written entirely in Java
Rhino - Mozilla | MDN
Download Rhino - Mozilla | MDN
Rhino documentation - Mozilla | MDN
Scripting Java - Mozilla | MDN