Category: JavaScript Tutorial

python tutorials and learn python

Created with Sketch.

JavaScript setTimeout

JavaScript setTimeout Summary: in this tutorial, you will learn how to use the JavaScript setTimeout() that sets a timer and executes a callback function after the timer expires. Introduction to JavaScript setTimeout() The setTimeout() is a method of the window object. The setTimeout()  sets a timer and executes a callback function after the timer expires.…
Read more

JavaScript prompt

JavaScript prompt Summary: in this tutorial, you will learn how to use the JavaScript prompt() method to display a dialog with a message prompting for user input. Introduction to JavaScript prompt() method The prompt() is a method of the window object. The prompt() method instructs the web browser to display a dialog with a text,…
Read more

JavaScript confirm

JavaScript confirm Summary: in this tutorial, you will learn how to display a confirmation dialog by using the JavaScript confirm() method. Introduction to JavaScript confirm() method To invoke a dialog with a question and two buttons OK and Cancel, you use the confirm() method of the window object: let result = window.confirm(question); Code language: JavaScript…
Read more

JavaScript alert

JavaScript alert Summary: in this tutorial, you will learn how to display an alert dialog by using the JavaScript alert() method. Introduction to JavaScript alert() method The browser can invoke a system dialog to display information to the user. The system dialog is not related to the webpage being shown in the browser. It also…
Read more

JavaScript Window

JavaScript Window Summary: in this tutorial, you will learn about the JavaScript window object which is the global object of JavaScript in the browser and exposes the browser’s functionality. The window object is global The global object of JavaScript in the web browser is the window object. It means that all variables and functions declared…
Read more

JavaScript BOM

JavaScript BOM The Browser Object Model (BOM) is the core of JavaScript on the web. The BOM provides you with objects that expose the web browser’s functionality. Section 1. Window Window – understand the window object. Alert – display an alert dialog. Confirm – display a modal dialog with a question. Prompt – prompt the…
Read more

Regular Expression: Sets and Ranges

Regular Expression: Sets and Ranges Summary: in this tutorial, you will learn about the sets and ranges in regular expressions. Sets The square brackets search for any character in a set. For example, [aeiou] matches any of the five characters: ‘a’, ‘e’, ‘i’, ‘o’ and ‘u’. The […] is called a set. For example, the…
Read more

JavaScript Regex Replace

JavaScript Regex Replace Summary: in this tutorial, you’ll learn how to use the string replace() method to return a new string with some or all matches of a regular expression replaced by a replacement string. Introduction to the JavaScript replace() method The String.prototype.replace() method works with both strings and regular expressions. This tutorial focuses solely…
Read more

JavaScript Regex match()

JavaScript Regex match() Summary: in this tutorial, you’ll learn about the JavaScript String match() method to match a string against a regular expression. To understand how the match() method works and how to use it effectively, you should have the basic knowledge of regular expression. Introduction to the JavaScript match() method The String match() method…
Read more

JavaScript Regex Lookbehind

JavaScript Regex Lookbehind Summary: in this tutorial, you’ll learn how to use JavaScript regex lookbehind in regular expressions to match X if it is preceded by Y. Introduction to the JavaScript regex lookbehind In regular expressions, a lookbehind matches an element if there is another specific element before it. A lookbehind has the following syntax:…
Read more