I'm new here and fairly new to JavaScript, so please bear with me. I've been converting a working python program to JavaScript with varying degrees of success. It's a fairly simple 8x8 button panel that modifies the button text when toggled. So far that works. However, some of the buttons are in "groups" that work like a mechanical switch that clears the other buttons in the group when a new one is selected.
There's a good reason that many developers pause before using .sort(), .reverse(), or .splice() in JavaScript: those methods mutate the original array. That single side effect can lead to subtle, hard-to-trace bugs, especially in apps with shared or reactive state. The good news is that in the last couple of years we've gotten new array methods that make working with arrays safer and cleaner by avoiding mutation altogether: These return copies instead of changing the original array.
ECMAScript is a standard for several scripting languages, including JavaScript. Since 2015, a new version of the ECMAScript spec has been published annually. These versions-ES6, ES7, and ES8, respectively-don't deprecate any old syntax, so you'll be able to safely run legacy ES5 code in future web browsers or standalone JavaScript engines, but they also include lots of new syntax elements that make the process of writing JavaScript code more productive.
JSON ("JavaScript Object Notation") is a way of encoding data as text - e.g., in text files. Its syntax is a subset of JavaScript. In other words: Each piece of JSON data is valid JavaScript source code - it's an expression. This is an example of a text file with JSON data: The syntax of JSON # The syntax of JSON works as follows: