Browsing Category
Javascript
JavaScript, often abbreviated as JS, is a high-level, just-in-time compiled, object-oriented programming language that uses the ECMAScript specification.
JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.
Objects, Arrays, and Strings are the main data structures of Javascript.
JavaScript Map Index: How to Use Index Inside Map
To access the index of the array map() method, use the second argument of the callback function. JavaScript array map() method creates the new array populated with the results of calling the provided function on every item in the calling…
Javascript Map Object: The Complete Guide
Javascript Map object holds key-value pairs and remembers the original insertion order of the keys.
JavaScript Map Object
Map in JavaScript is a collection of keyed data elements, just like an Object. But the main difference is that the…
Javascript: Find Object in Array
You often get in the scenarios where you have an array of objects, and you need to find some specific object inside this array based on some property of the object. Let's see how to find an object in the array in JavaScript.
Javascript:…
How to Check Array Item using array.some() Method in JavaScript
Javascript array some() function tests whether some item in the array passes the test implemented by the provided function. The some() method is the JavaScript extension to the ECMA-262 standard; thus, it may not be present in other…
How to Check If Array Contains Specific Item in JavaScript
There is no inbuilt array contains() function in JavaScript. To check if an array contains the specific item, use array includes() function.
JavaScript Array Contains
To check if JavaScript array contains the item or not, use array…
Javascript: Remove First Element from Array
Removing items from an array is a standard programming paradigm that developers often run into. There are several ways to remove the first element from an array.
Use array.shift() method
Use array.splice() method
Remove First…
How to Remove Key From JavaScript Object
To remove the key from Object in Javascript, delete operator. Javascript Delete Operator deletes a property from an object. The delete operator enables you to remove the property from an object. The delete only returns false when a property…
JavaScript: How to Add Property to Object
Is it possible to add properties to this Object after its initial creation if the properties' name is not determined until run time? Well, the answer is yes, you can do add dynamic properties to object after Object is created, and let's see…
How to Convert JavaScript Int to String
The toString() method in Javascript is used with the number and converts a number to a string. The toString() function is used to return the string representing the specified Number object.
Javascript Int to String
To convert Javascript…
How to Convert String to Int in Javascript
Data type conversion is a big part of any programming language and converts String to Integer is one of the most used conversion.
Convert String to Int in JavaScript
To convert a string to integer in JavaScript, use the parseInt()…
Javascript Sum Array: How to Find Sum of Array in JS
How can you find the sum of its elements? Well, the solution is an array.reduce() method. Array.prototype.reduce() function can be used to iterate through an array, adding the current element value to the sum of the previous item values.…