Blog

python tutorials and learn python

Created with Sketch.

JavaScript String endsWith

JavaScript String endsWith Summary: in this tutorial, you will learn how to use the JavaScript String endsWith() method to check if a string ends with a substring. Introduction to the JavaScript String endsWith() method The endsWith() returns true if a string ends with the characters of a specified string or false otherwise. Here’s the syntax…
Read more

JavaScript String startsWith()

JavaScript String startsWith() Summary: in this tutorial, you will learn how to use the JavaScript String startsWith() method to check if a string starts with a substring. Introduction to the JavaScript startsWith() method The startsWith() returns true if a string starts with a substring or false otherwise. The following shows the syntax of the startsWith()…
Read more

JavaScript Array findIndex() Method

JavaScript Array findIndex() Method Summary: in this tutorial, you will learn how to use the Array findIndex() method to find the first element that satisfies a given test. Introduction to the JavaScript Array findIndex() Method ES6 added a new method called findIndex() to the Array.prototype, which allows you to find the first element in an…
Read more

JavaScript Array find() Method

JavaScript Array find() Method Summary: in this tutorial, you will learn how to use the JavaScript find() method to search for the first element in an array, which satisfies a test. Introduction to the Array find() method In ES5, to find an element in an array, you use the indexOf() or lastIndexOf() methods. However, these…
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

JavaScript Array.of()

JavaScript Array.of() Summary: in this tutorial, you will learn how to improve array construction using the JavaScript Array.of() method in ES6. Introduction to the JavaScript Array.of() method In ES5, when you pass a number to the Array constructor, JavaScript creates an array whose length equals the number. For example: let numbers = new Array(2); console.log(numbers.length);…
Read more

JavaScript Object Destructuring

JavaScript Object Destructuring Summary: in this tutorial, you’ll learn about JavaScript object destructuring which assigns properties of an object to individual variables. If you want to learn how to destructure an array, you can check out the array destructuring tutorial. Introduction to the JavaScript object destructuring assignment Suppose you have a person object with two…
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 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

JavaScript Template Literals In Depth

JavaScript Template Literals In Depth Summary: in this tutorial, you will learn about JavaScript template literal, which allows you to work with a string template more easily. Before ES6, you use single quotes (‘) or double quotes (“) to wrap a string literal. And the strings have very limited functionality. To enable you to solve…
Read more