JavaScript join
In this lesson we introduce the JavaScript join method which, given an array, returns a string. This method is similar to the previous toString, discussed in the previous lesson. The…
In this lesson we introduce the JavaScript join method which, given an array, returns a string. This method is similar to the previous toString, discussed in the previous lesson. The…
In this lesson we will talk about the JavaScript slice method useful for selecting elements of an array. This method returns a new array with the selected elements. The syntax…
JavaScript forEach method is used over arrays to iterate and apply a function to each element. This method was introduced starting with ECMAScript 5 (ES5), along with other features. The…
The JavaScript splice method adds and removes elements to an array starting from a specified location. The syntax is as follows: array.splice(index, q, element1,…, elementN). Where index represents the index…
In this lesson we study JavaScript reverse method, which is useful for reversing the elements of an array. The syntax is as follows: array.reverse(). So let’s take some examples to…
In this article we will talk about the JavaScript sort method, which is useful for sorting the elements of an array. The syntax of the sort() method is as follows:…
In this lesson we will talk about the JavaScript map method, used with arrays. This method creates a new array with the results of calling a function for each element…
The JavaScript array indexOf method, returns the starting position of an element within an array or string. The syntax of this method is as follows: array.indexOf(element) Where element is therefore…
The length property used on arrays in JavaScript is useful for determining how many elements are contained in an array. This property is also used to determine the length of…
We study some JavaScript methods to add an attribute to elements. In particular, in this lesson we will use createAttribute() and setAttributeNode(). In the previous article we saw how to…
We continue our tutorial in JavaScript using the createTextNode method, which is the method that allows us to insert text into a node. In fact, after having created a new…
In this lesson we will learn how to use nested loops in Python, that is, iterations that run inside other iterations. So, let’s take some examples to understand how they…
Caesar cipher decoder developed using JavaScript. Try entering a text in the plain text input box and also choose a numeric key, then click on the digit button to get…
Python Examples – In this lesson we will do other examples in Python using the for loop. We therefore propose some algorithms to better understand the meaning of the iterative…
We will perform other for loop examples in Python in order to consolidate what we have studied so far. For loop examples Python – first example Design an algorithm that…
In the previous Python lesson we studied prime numbers, here is the link of the lesson. Now we will develop a Python algorithm for prime numbers from 2 to N.…
In this lesson we will study indefinite loop in Python, that is loops where the number of iterations is not known at the beginning of the loop. Let’s take some…
In this lesson we will make a program on friendly numbers in Python, in order to practice with iterative structures. Recall that two numbers are said to be friendly if…