Formatting code: Prettier is something folks should know about; it integrates with ESLint quite nicely, and can be added to most code editors pretty easily.
let, const, and var: In the examples given, doing let container = document.getElementByID('SomeId') is more of a signal to the developers that it will somehow be changing. In fact, the variable itself never changes, it still points to the same DOM element object, which is changing internally. This can be hugely confusing to realize that const container = document.getElementById('SomeId') ; container.innerHTML = "Hello" will work exactly the same way. Kyle Simpson (@getify) has a great discussion on this in YDKJS.
let container = document.getElementByID('SomeId')
const container = document.getElementById('SomeId') ; container.innerHTML = "Hello"
Also, don't completely discard var from your vocabulary as it still has uses; instead understand when and where to apply it.
The adage "use const until you can't" is a good one if everyone understands that.
I come to the comments looking for an explanation about the let/const and why we should use them instead of var.
Can you clarify the difference for me?
No where near as well as Kyle does: github.com/getify/You-Dont-Know-JS...
Came here to make literally these two comments!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.