Posts from JavaScript

Sort array of objects by string property value in JavaScript

By Samim Raja Mollick

An array of objects basically means an array that contains one or more than one object. It is possible to sort an array by a user-defined function. The property of each object in t.... Read More

Pick a random element from an array in JavaScript

By HETVI JAIN

 In this tutorial, we will learn how to pick a random element from an array in JavaScript. It is essential to know because this is a very common type of operation you will do with.... Read More

Return multiple values from a function in JavaScript

By Samim Raja Mollick

This tutorial will show you how to return multiple values from a function in JavaScript. A JavaScript function returns only a single value. Multiple values can be returned from a f.... Read More

How to remove new line character in JavaScript (\n)

By HETVI JAIN

In this article, we will look at different methods to remove new line character from Strings in Javascript. Removing new line character (\n) in JavaScript String.replace(): This me.... Read More

How to find the resolution of an Image in JavaScript

By HETVI JAIN

We can get the original height and width of the image, this height and weight of the image is the actual size of an image without any constraints. Constraints like explicitly menti.... Read More

Read meta data of an image file using JavaScript

By HETVI JAIN

In this tutorial, we learn about reading the meta of an image file. Metadata refers to relevant data about the image file and its features. We will use a Javascript library called .... Read More

Apply JavaScript map() to an Array

By HETVI JAIN

In this tutorial, we will learn about a built-in function in JavaScript known as map(). It is a high-order function. The map() method returns a new array containing the results of .... Read More

Combine Multiple Strings in JavaScript

By Samim Raja Mollick

In this tutorial, I am going to explain how to combine multiple strings in JavaScript. Sometimes we need to combine two or more strings into one variable and use the combined strin.... Read More

Related Posts