re: Do's and Don'ts for Javascript Newbies VIEW POST

FULL DISCUSSION
 

Consistency is also a Best Practice. When authoring an article and suggesting that Javascript developers use:

const container = document.getElementById("someElementId");

And then later in that same article the author uses:

let container = document.getElementById("someElementId");

It can elicit the pernicious WTF response followed by an emoji :-)

 

Like the article says the let syntax indicates that the value is to be changed which happens in the code snippet.

code of conduct - report abuse