JavaScript : Difference between == and ===

In this tutorial we will discover the difference between = , == and === in javascript.= Is used to assign values to a variable in JavaScript.== Is used for the comparison between two variables regardless of the type of the variable.=== Is used for a strict comparison between two variables i.e. it will check the […]

En Lire Plus

(SOLVED) How to open a URL in a new Tab ?

In this tutorial , we will show you how you can open a URL in a new Tab and not a new window. we will start by creating a function to load a given URL into a new Tab . We can do this directly in the onclick JavaScript Action without a function . When […]

En Lire Plus

(SOLVED) how to insert an HTML element before another ?

If you need to insert an HTML element like one <div> or any other element before an existing element in the HTML Document you have to : 1. Get the element by ID : 2. Create the HTML element 3. Insert the element Here we will use insertBefore function to insert the created Div before the recovered Table. If you want […]

En Lire Plus

JavaScript : Qu’est-ce que le DOM ?

Le DOM ( Document Object Model ) c’est-à-dire “modèle d’objet de document”, en français , c’est une interface de programmation qui est une représentation du HTML d’une page web et qui permet d’accéder aux éléments de cette page web et de les modifier avec le langage JavaScript. Le DOM est comme un arbre où chaque élément peut avoir zéro ou plusieurs enfant. […]

En Lire Plus

Get The Differences Between Two Dates In JavaScript

JavaScript Differences Between Two Dates : Hi, welcome to the practice house. In this tutorial, we will learn about how to get the difference between two dates in JavaScript. Almost all the time, we use date input field to select the date. Sometimes we need to find the difference between two dates. If you are […]

En Lire Plus

Type Script : sum of object properties within an array

If we need to sum a simple array, we can use the reduce method, that executes a reducer function (that you provide) on each member of the array resulting in a single output value. For example: But if we have an objects array like the following: We need to use the map method (that creates a new array […]

En Lire Plus

(SOLVED) getTime() is not a function ?

getTime() is not a function : if you are using the function getTime() and you have this error (in javascript / Typescript ) that mean you are using the date as a String , so as a solution you must parse the Date. See the next example to understand how solve this !Solution :

En Lire Plus