Aman Kumar has Published 44 Articles

How to deserialize a JSON into Javascript object?

Aman Kumar

Aman Kumar

Updated on 19-Dec-2022 11:12:58

3K+ Views

Serialization is the process of converting an object such that it is transferable over the network. In JavaScript usually we serialize an Object into the JSON (or JavaScript Object Notation) format. To reserialize a JSON into a JavaScript object, we need to use the method JSON.parse(). JavaScript object notation is ... Read More

How do I pass an event handler to a component in ReactJS?

Aman Kumar

Aman Kumar

Updated on 08-Dec-2022 06:15:01

1K+ Views

Reactjs is an open source javascript library, used in web development to build interactive pages in websites. Reactjs provides user friendly, declarative, and precise. Components Components are individualistic and reusable bits of code in react js. It helps to create separate files for our class and function. In general components ... Read More

How to shallow copy the objects in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 12:41:43

324 Views

In this article we are going to discuss how to perform shallow copy on JavaScript objects. If the source value is the reference to an object, then it will only copy the reference value into the target value. When the source properties are copied without reference and there exists a ... Read More

How to find whether a provided number is safe integer or not in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 08:07:15

191 Views

Java script provides a Number.isSafeInteger() to check whether the given number is a safe integer or not. If the integer is safe then returns true otherwise it will return false.. JavaScript has some restrictions regarding the number, any number should be in an SCNF standardized computer network format. If a ... Read More

How to compare dates in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 08:02:13

3K+ Views

Dates can be compared easily in the JavaScript the dates can belong to any frame like past, present, or future. Past dates can be compared to the future and the future can be compared to the past and present. The date object will do what you want to construct one ... Read More

What is the use of parsing dates in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 07:59:41

90 Views

The date. parse() method parsing a string representation of a date, and returns the number of milliseconds. parse() parse a date string and returns the time difference between midnight 1, 1970 to provided date. The date. parse() method is used to know the exact number of milliseconds that have passed ... Read More

How to invoke a function with a function constructor in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 07:53:41

955 Views

A function constructor invocation creates a new object. The new object inherits the properties and methods from the constructor. This keyword in the constructor does not have a value. This value will be a new object created when the function is invoked. Function construction creates functions that execute the global scope ... Read More

What is the importance of '+' operator in type conversion in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 07:48:50

132 Views

Java script is an autonomous type of language most of the time operation directly convert the value of their write type. But there are also cases in which we need to do explicit type conversion.While Java script provides many ways to convert data from one form to another. But there ... Read More

What is the relation between 'null' and '0' in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 07:41:06

3K+ Views

It looks very odd to hear that because in mathematics if we have two numbers i.e a and b and if a is not less than b then the possible scenarios are either a is greater than or equal to b. But in the case of null and “0” null ... Read More

How to get the values of an object in JavaScript?

Aman Kumar

Aman Kumar

Updated on 06-Dec-2022 07:21:21

442 Views

There are some methods for finding the value of an object which is an object.values(), but when you are using this method the process will be lengthy. We can find easily the value of an object with the help of the _.values() function it is a built-in method that belongs ... Read More

Advertisements