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

Continue reading on JavaScript in Plain English »

 •  0 comments  •  flag
Share on Twitter
Published on June 15, 2021 03:35

Here Is What Happens When Freezing The Prototype

Prototypes, Object.freeze, Object.create and more

Continue reading on Frontend Essentials »

 •  0 comments  •  flag
Share on Twitter
Published on June 15, 2021 02:00

June 7, 2021

10 Utility Functions for Working with Objects in JavaScript

Freezing objects, getting all keys and values, inheriting from prototypes, and more

Continue reading on DailyJS »

 •  0 comments  •  flag
Share on Twitter
Published on June 07, 2021 02:33

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

Continue reading on Frontend Essentials »

 •  0 comments  •  flag
Share on Twitter
Published on May 27, 2021 23:02

May 26, 2021

May 25, 2021

How to Add Two Numbers

Fixing the inexact decimal arithmetic by using integer arithmetic

Continue reading on Frontend Essentials »

 •  0 comments  •  flag
Share on Twitter
Published on May 25, 2021 23:03

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

Continue reading on Frontend Essentials »

 •  0 comments  •  flag
Share on Twitter
Published on May 24, 2021 23:02

May 23, 2021

5 Productivity Tips You Can Learn From John Carmack

Focus, learning trips, keep a to-do list, and more

Continue reading on Frontend Essentials »

 •  0 comments  •  flag
Share on Twitter
Published on May 23, 2021 23:03

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 hoisting

let

can be reassignedcan be redeclaredcan have block scopeno hoisting

var

can be reassignedcan be redeclareddoes not have block scopehoisted

You can check the differences in detail in the previous article.

Do You Know the Differences Between var,...

 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2021 05:42

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 hoisting

let

can be reassignedcan be redeclaredcan have block scopeno hoisting

var

can be reassignedcan be redeclareddoes not have block scopehoisted

Thanks for reading.

You can check the differences in detail in the previous article.

Do You Know the Diffe...

 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2021 05:42