Category: JavaScript

Detect the start and end of CSS animations with JavaScript 0

Detect the start and end of CSS animations with JavaScript

With JavaScript, it possible to detect the events (start, restart and end) of CSS animations. This is useful if want to perform some actions based on the animation state.

Generating random number in JavaScript 0

Generating random number in JavaScript

In JavaScript, you can generate a random number using the random() method. This method returns a number between 0 and 1 (including 0).

Email validation using JavaScript 0

Email validation using JavaScript

Most of the HTML forms which collects the user data contains an email field. It is a good practice to properly validate those fields in the form before sending it to the server.

0

JavaScript variables

In programming, a variable is a value that can be changed. All variables will have a storage location and a name. The variable name is usually used to refer to the value that is stored in a variable.