JavaScript Number Object | Basics
JavaScript Number is a primitive data type that stores numeric values. In JavaScript don’t need to declare for integer or floating values using int, float,… Read More »JavaScript Number Object | Basics
JavaScript Number is a primitive data type that stores numeric values. In JavaScript don’t need to declare for integer or floating values using int, float,… Read More »JavaScript Number Object | Basics
JavaScript string holds primitive type values which is a sequence of characters. JavaScript treats primitive values as objects when executing methods and properties. Strings can… Read More »JavaScript string Object | Basics
Use Use instanceof for custom types and use typeof for simple and complex built-in types, this is the main difference between typeof and instanceof in… Read More »What is the difference between typeof and instanceof?
Using JavaScript if else statement you can decision maker program. The if statement executes a statement if a specified condition is truthy. If the condition… Read More »JavaScript if else statement | Basic code
JavaScript NaN is the return value from operations that have an undefined numerical result. NaN is an error value that means not a number. Below… Read More »How to avoid NaN in JavaScript | Basic code
Just use the literal values, true or false to declare Boolean in JavaScript. You should never create a boolean using the Boolean constructor function because… Read More »Declare Boolean in JavaScript | Basic code
Using JavaScript optional chaining operator (?.) can get the value of a property located deep objects (Nested Object) without having to check that if each… Read More »JavaScript Optional Chaining | Use and Examples
Use JavaScript Object hasOwnProperty() method to check if the object has the given property as its own property. This returns true if the specified property… Read More »JavaScript hasOwnProperty | Method
There are multiple ways to declare an empty array in JavaScript. Below code is the simplest way when all you need is only an empty… Read More »JavaScript declare empty array | Basic Code
Use Object.create() method to create a new object in JavaScript. It will use an existing object as the prototype of the newly created object. Use… Read More »JavaScript Create a new object | Example code