#javascript

Found 136 articles tagged with #javascript

What's New in JavaScript ES2015 (ES6)

It was released in 2015, and is also known as ES2015 or ECMAScript 6. ES6 makes JavaScript more expressive, concise, and powerful.

Promise Chaining in JavaScript

A technique that allows you to chain multiple promises together, where each subsequent promise depends on the result of the previous one.

How to use destructuring assignment in JavaScript

A feature in JavaScript that allows you to extract values from objects or arrays and assign them to variables in a more concise and readable way.

Check if object has a specific property in JavaScript

Method hasOwnProperty is often preferred when you want to check only the object itself, while the in operator is useful when you want to check the entire prototype chain.

How to return multiple values in JavaScript

If there are multiple pieces of data that are logically related to each other, it makes sense to group them together and return them as a single unit.

How to add zeros before number in javascript

Adding leading zeros to a number is often necessary in scenarios where the representation of the number needs to have a fixed width or format.

What is array-like object in JavaScript

An object that has numeric indices and a length property.

Using string substring() or slice() in JavaScript

The main difference between `substring()` and `slice()` in JavaScript is how they handle negative or out-of-range arguments.

How to clear an array in JavaScript

When you say "clear the array" in the context of programming, it generally means removing all the elements from the array, leaving it empty.

Jan 16, 2024#javascript#arrays

How to reverse a string in JavaScript

You can achieve string reversal using array manipulation methods like split, reverse, and join or through loops and other techniques.