Cristian Salcescu's Blog, page 8
June 15, 2021
How to Get a Random Value From an Array in JavaScript
Quick Start with the Math.random and Math.floor functions
Here Is What Happens When Freezing The Prototype
June 7, 2021
10 Utility Functions for Working with Objects in JavaScript
Freezing objects, getting all keys and values, inheriting from prototypes, and more
May 27, 2021
How to Sum All The Digits in a Number
Put in practice the String and Number built-in functions, the split and reduce methods
May 26, 2021
How to Count Each Character Occurrence in a Word with JavaScript and Elixir
May 25, 2021
How to Add Two Numbers
Fixing the inexact decimal arithmetic by using integer arithmetic
May 24, 2021
8 Things to Know About NaN
NaN is a number, NaN is not equal to NaN, isNaN gives false positives and more
May 23, 2021
5 Productivity Tips You Can Learn From John Carmack
May 21, 2021
Differences between var, let, and const
The differences between var, let, and const variable declarations are based on the availability of the block scope, the hoisting effect, the possibility of being resigned and redeclared.
const
cannot be reassignedcan be redeclaredcan have block scopeno hoistinglet
can be reassignedcan be redeclaredcan have block scopeno hoistingvar
can be reassignedcan be redeclareddoes not have block scopehoistedYou can check the differences in detail in the previous article.
Differences Between var, let, and const
The differences between var, let, and const variable declarations are based on the availability of the block scope, the hoisting effect, the possibility of being resigned and redeclared.
const
cannot be reassignedcan be redeclaredcan have block scopeno hoistinglet
can be reassignedcan be redeclaredcan have block scopeno hoistingvar
can be reassignedcan be redeclareddoes not have block scopehoistedThanks for reading.
You can check the differences in detail in the previous article.