Category: JavaScript Tutorial

python tutorials and learn python

Created with Sketch.

JavaScript Regular Expression

JavaScript Regular Expression Summary: in this tutorial, you’ll learn about JavaScript regular expressions. After the tutorial, you’ll know how to use regular expressions effectively to search and replace strings. Introduction to regular expressions in JavaScript A regular expression is a string that describes a pattern e.g., email addresses and phone numbers. In JavaScript, regular expressions…
Read more

Javascript Regex

Javascript Regex Regex stands for regular expressions, which are sequences of characters that specify search patterns. In JavaScript, you’ll find regular expressions in many applications such as data validations based on patterns. This page helps you master regex in JavaScript from scratch. After the tutorials, you’ll be confident writing regular expressions and using regex functions…
Read more

JavaScript toLowerCase()

JavaScript toLowerCase() Summary: in this tutorial, you’ll learn how to use the JavaScript String.prototype.toLowerCase() method to return a string with all the characters converted to lowercase. Introduction to the JavaScript toLowerCase() method The toLowerCase() method returns a new string with all characters converted to lowercase. The following shows the syntax of the toLowerCase() method: str.toLowerCase()…
Read more

JavaScript toUpperCase()

JavaScript toUpperCase() Summary: in this tutorial, you’ll learn how to use the JavaScript String.prototype.toUpperCase() method to return a string with all the characters converted to uppercase. Introduction to the JavaScript toUpperCase() method The toUpperCase() method returns a new string with all characters converted to uppercase. Here’s the syntax of the toUpperCase() method: str.toUpperCase() Code language:…
Read more

JavaScript String replaceAll

JavaScript String replaceAll Summary: in this tutorial, you’ll learn about the String replaceAll() method that replaces all occurrences of a substring with a new string. Introduction to the JavaScript string replaceAll() method The String replace() method allows you to replace the first occurrence of a substring in a string with a new one. To replace…
Read more

JavaScript String replace()

JavaScript String replace() Summary: in this tutorial, you’ll how to use JavaScript String replace() method to replace a substring in a string with a new one. Introduction to the JavaScript String replace() method The following shows the syntax of the replace() method: let newStr = str.replace(substr, newSubstr); Code language: JavaScript (javascript) The JavaScript String replace()…
Read more

JavaScript Template Literals In Depth

JavaScript Template Literals In Depth Summary: in this tutorial, you will learn about JavaScript template literal, which allows you to work with a string template more easily. Before ES6, you use single quotes (‘) or double quotes (“) to wrap a string literal. And the strings have very limited functionality. To enable you to solve…
Read more

JavaScript String concat()

JavaScript String concat() Summary: in this tutorial, you’ll learn how to use the JavaScript concat() method to concatenate strings. Introduction to the JavaScript String concat() method The String.prototype.concat() method accepts a list of strings and returns a new string that contains the combined strings: string.concat(str1, […strN]); Code language: JavaScript (javascript) If the arguments are not…
Read more

JavaScript String slice()

JavaScript String slice() Summary: in this tutorial, you will learn how to use the JavaScript String slice() method to extract a substring from a string. Introduction to the JavaScript String slice() method The String.prototype.slice() method extracts a portion of a string and returns it as a substring. The following shows the syntax of the slice()…
Read more

JavaScript substring()

JavaScript substring() Summary: in this tutorial, you’ll learn how to use the JavaScript substring() method to extract a substring from a string. Introduction to the JavaScript substring() method The JavaScript String.prototype.substring() returns the part of the string between the start and end indexes: str.substring(startIndex [, endIndex]) Code language: JavaScript (javascript) The substring() method accepts two…
Read more