Javascript Remove Last Character : In this tutorial we will study the different methods to remove the last character of a string in the Javascript language. Introduction In some situations, it may be necessary to delete the last character of a string. In Javascript, there are several ways to do this: Remove the last character… Continue reading Javascript Remove Last Character From String
Category: Javascript
How to Validate Email with Javascript
Validate an email with javascript : In this tutorial, we are going to see the different ways to validate an email address in javascript as well as all the options available to perform this validation. Introduction JavaScript is a programming language that is widely used in web development. When we create a website or an… Continue reading How to Validate Email with Javascript
How to Enable and Disable Button Javascript
In this tutorial we will show you how to enable or disable a javascript button. Introduction On the Web, forms are often used for the user to enter information. Most of the time, you will be able to submit a form only when in the form the fields are filled in (For example when you… Continue reading How to Enable and Disable Button Javascript
Javascript Loops
There are several ways to do iterations in javascript through loops. This post explains the different looping methods that exist in Javascript. You can execute all the codes described in this post from this site: https://js.do/ It allows you to execute Javascript code directly online without installing anything! 🙂 Javascript For loop Output : Pokemon… Continue reading Javascript Loops
Javascript sleep function
How to make a function sleep for a certain period of time in Javascript? Sleep() function With the help of the Sleep() function, we can create a function to interrupt the execution of the program for a certain period of time. The problem is that in Javascript there are no sleep() functions like in other… Continue reading Javascript sleep function
Check if a date is today in JavaScript
How can you determine if a JavaScript Date object instance is a representation of a date/time that is “today” date? Given a Date instance, we can use thegetDate(),getMonth() and getFullYear() methods, which return the day, month and year of a date. The getDay() method returns the day of the week for the specified date according to… Continue reading Check if a date is today in JavaScript
How to replace all occurrences of a string in JavaScript
How to replace all occurrences of a string in JavaScript : The replace() method in Javascript searches within a string for a specified value or regular expression and returns a new string in which the specified values are replaced. However, if a string contains repeated words, the replace() method changes only the first occurrence of a… Continue reading How to replace all occurrences of a string in JavaScript