Category: JavaScript Tutorial

python tutorials and learn python

Created with Sketch.

JavaScript String search()

JavaScript String search() Summary: in this tutorial, you’ll learn how to use the JavaScript String search() function to locate a substring within a string using a regular expression. Introduction to the JavaScript String search() function The search() method accepts a regular expression and returns the index of the first match in a string: let index…
Read more

JavaScript String Methods

JavaScript String Methods This page provides string methods that help you manipulate strings effectively. Section 1. Searching search() – locate a substring in a string using a regular expression. indexOf() – get the index of the first occurrence of a substring in a string. lastIndexOf() – find the index of the last occurrence of a substring…
Read more

JavaScript Multidimensional Array

JavaScript Multidimensional Array Summary: in this tutorial, you will learn how to work with a JavaScript multidimensional array and manipulate its elements effectively. Introduction to JavaScript multidimensional array JavaScript does not provide the multidimensional array natively. However, you can create a multidimensional array by defining an array of elements, where each element is also another…
Read more

JavaScript Array at

JavaScript Array at Summary: in this tutorial, you will learn how to use the JavaScript Array at() method to return an element by an index. Introduction to the JavaScript Array at() method In JavaScript, you can use the square bracket [] to access an element of an array. For example, the arr[0] returns the first…
Read more

JavaScript Spread Operator

JavaScript Spread Operator Summary: in this tutorial, you will learn about the JavaScript spread operator that spreads out elements of an iterable object. Introduction to the JavaScript spread operator ES6 provides a new operator called spread operator that consists of three dots (…). The spread operator allows you to spread out elements of an iterable…
Read more

ES6 Destructuring Assignment

ES6 Destructuring Assignment Summary: in this tutorial, you will learn how to use the ES6 destructuring assignment that allows you to destructure an array into individual variables. ES6 provides a new feature called destructing assignment that allows you to destructure properties of an object or elements of an array into individual variables. Let’s start with the…
Read more

JavaScript Array Join

JavaScript Array Join Summary: in this tutorial, you’ll learn how to use the JavaScript Array join() method to concatenate all elements of an array into a string separated by a separator. Introduction to the JavaScript array join() method The join() method allows you to concatenate all elements of an array and returns a new string:…
Read more

JavaScript Array flatMap

JavaScript Array flatMap Summary: in this tutorial, you’ll about the JavaScript Array flatMap() method that maps each element in an array using a mapping function and flattens the result into a new array. Introduction to JavaScript Array flatMap() method The flat() method creates a new array with the elements of the subarrays concatenated into it.…
Read more

JavaScript Array flat()

JavaScript Array flat() Summary: in this tutorial, you’ll learn how to use the JavaScript Array flat() method to flat an array. Introduction to the JavaScript Array flat() method ES2019 introduced the Array.prototype.flat() method that creates a new array with all the elements of the subarrays concatenated to it recursively up to a specified depth. The following…
Read more

JavaScript Array.from()

JavaScript Array.from() Summary: in this tutorial, you will learn about the JavaScript Array.from() method that creates a new array from an array-like or iterable object. Introduction to JavaScript Array Array.from() method To create an array from an array-like object in ES5, you iterate over all array elements and add each of them to an intermediate…
Read more