JavaScript: How to get a Random Integer Between Two Numbers

JavaScript: How to get a Random Integer Between Two Numbers

In this post, we will fetch a random integer between two numbers we define. I.E. let’s say we want a random number between 1 and 100. We will use methods from the MATH object to achieve this. More specifically the Random and Floor methods. Let’s first see what the random method does: We don’t want…

Mutable and Immutable Types in JavaScript (With Examples)

Mutable and Immutable Types in JavaScript (With Examples)

Mutability and Immutability are core principles in various programming paradigms. JavaScript being one of the most used languages on the Internet, mastering what is mutable and immutable types in JavaScript is a plus to acing this common interview question in programming. In this article, we’ll answer this question with examples to make the concept clear….