It’s All About JavaScript

Introduction to javascript :

Javascript is a scripting language. It Is also a high-level, lightweight, often just-in-time compiled, and multi-paradigm language. It is an interpreted programming language with object-oriented capabilities. It helps to perform complex features on web pages.

Javascript’s Type :

The Type is the building block of any language. So, javascript has some types. The types of javascript are given below:

They are Number, String, Boolean, Function, Object, Symbole.

Javascript Number :

There are two types of number in javascript: Number and BigInt.

There are some functions in Javascript Number. Such as:

isNaN(): This function helps to test NaN(Not a Number) value. if it uses this global(isNaN()), it will behave unintuitive. We can use this function: Number.isNan().

Example:

Number.isNan():

isNan():

parseInt(): If you want to convert a String to an Integer, you have to use this function.

Example:

parseFloat(): If you want to convert a String to a Float Number, you have to use this function.

Example:

Javascript Math :

If you need to do a mathematical process in javascript, you have to use some function related to Math. Math is not a function object.

There are some functions in Javascript Number. Such as:

Math.abs(): If you want an absolute value of a number, you have to use this function.

Example:

Math.celi(): Math.celi() function always rounds a number up to the next largest integer.

Example:

Math.sqrt():Math.sqrt() function returns the square root of a number.

Example:

Javascript String :

String represents a sequence of characters. If you want to execute a line with the combination of some characters, you have to use string type. String is a primitive data type.

Example: