- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 8894 Articles for Front End Technology
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
475 Views
In this tutorial, we will learn to compare two strings in a current locale with JavaScript. The meaning of the locale is local place or region. Here, we need to compare two strings based on the language of the particular locale. Normally, when users compare the strings using equality or strict equality operators, it doesn’t compare strings based on the current locale. So, we will learn to compare the two strings based on the language of the particular locale. Compare two strings using the localeCompare() Method The String localeCompare() method compares the string with the reference string according to the ... Read More
![Prabhdeep Singh](https://www.tutorialspoint.com/assets/profiles/546958/profile/60_1428686-1667456005.jpg)
138 Views
In this tutorial, we will explore the methods by which we can repeat a string a certain number of times, again and again, to make a new string in JavaScript. There are many scenarios where we may want to make a new string which is just another string repeated ‘x’ number of times and we will see how to achieve that easily using inbuilt methods provided by JavaScript. We want to create a new string which is just another string copied some number of times. Although we can accomplish this task manually by using a for loop or a while ... Read More
![Sravani Alamanda](https://www.tutorialspoint.com/assets/profiles/507714/profile/60_44900-1661507911.jpg)
2K+ Views
In this tutorial, we will learn to find the non-digit character with JavaScript regular expression. ASCII code 'A' is 65 and 'a' is 97 etc. Now, we will check how to find a nondigit element (\D) in a given text using RegExp. RegExp is an object that specifies the pattern used to do search and replace operations on string or for input validation. RegExp was introduced in ES1 and it is fully supported by all browsers. Syntax Syntax for the non-digit element is, new RegExp("\D") or simply /\D/ /\D/, is introduced in ES1. It is fully supported by ... Read More
![Sravani Alamanda](https://www.tutorialspoint.com/assets/profiles/507714/profile/60_44900-1661507911.jpg)
1K+ Views
In this tutorial, we learn how to find non-word characters in a string using JavaScript Regular Expression. Actually, word characters include A-Z, a-z, 0-9 and _. Coming to the non-word characters except word characters like !, @, #, $, %, ^, &, *, (, ), {, } etc. Non-word characters, we denote as \W. We all know about RegExp (Regular Expression) in JavaScript. RegExp is an object that specifies the pattern used to do a search and replace operations on a string or for input validation. RegExp was introduced in ES1 and it is fully supported by all browsers. ASCII ... Read More
![Sravani Alamanda](https://www.tutorialspoint.com/assets/profiles/507714/profile/60_44900-1661507911.jpg)
81 Views
In JavaScript, the regular expression [^0-9] is used to find the characters inside the bracket but not a digit. Except digit mentioned in the bracket, it will return the remaining characters from the text as an array. We all know about RegExp (Regular Expression) in JavaScript. RegExp is an object that specifies the pattern used to do a search and replace operations on the string or for input validation. RegExp was introduced in ES1 and it is fully supported by all browsers. Syntax Syntax for non-digit or /[^0-9]/ character is- new RegExp("[^0-9]") or simply /[^0-9]/ Here /[^0-9]/ , ... Read More
![Abhishek](https://www.tutorialspoint.com/assets/profiles/545227/profile/60_599940-1667195518.jpeg)
1K+ Views
In this tutorial, we will learn how we can find a character between the brackets in JavaScript RegExp with examples. Syntax Following is the syntax that you have to follow for finding the character between the brackets of JavaScript RegExp − [……] In the above syntax, you can put the character or the combination of characters that you are searching in place of dots while the square brackets are the basic syntax to indicate the use of JavaScript RegExp. Below is the list of different syntaxes that you can use to check for the presence of different characters in ... Read More
![Abhishek](https://www.tutorialspoint.com/assets/profiles/545227/profile/60_599940-1667195518.jpeg)
993 Views
RegExp or RegEx in JavaScript is the short form of Regular Expressions. Regular Expressions are used to check validity of a particular combination of characters, digits, or any other symbol entered by the user. Regular expressions are mainly used for checking valid emails, and passwords that authenticate the correct user to log in. In this tutorial, we will learn how we can find a character that is not present between the brackets of JavaScript RegExp. Syntax Following is the syntax that is used to find the character, not between the brackets of JavaScript RegExp − [^……] In above syntax, ... Read More
![Sravani Alamanda](https://www.tutorialspoint.com/assets/profiles/507714/profile/60_44900-1661507911.jpg)
899 Views
In this tutorial, we will see how to find a word character from the text. Word character denote as \w. Word character is a character like a-z, A-Z and 0-9 and also includes underscore(_). We all know about RegExp (Regular Expression) in js. RegExp is an object and specifies the pattern used to do search and replace operations on string or for input validation. RegExp was introduced in ES1 and it is fully supported by all the browsers. ASCII code for A-Z is 65- 90, a-z is 97-122, 0-9 is 48-57 and for underscore is 95. Syntax Syntax for word ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
875 Views
In this tutorial, we will learn what are the different types of DOM available to access and modify content in JavaScript. The Document Object Model (DOM) is a data representation of the objects that form the structure and content of a web document. It is an interface for scripting web pages. Programs can alter the document’s structure, style, and content by utilizing the DOM. The DOM represents each element as a node, and the programming languages like JavaScript can easily interact with the nodes to modify the page. There are different types of DOM available to access and modify content ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
332 Views
In this tutorial, let us discuss the three types of errors we can expect in our JavaScript code. Errors are statements that block the execution of the program. During the compilation of the program, three types of errors can occur. These are syntax errors, run time errors, and logical errors. Syntax Errors Syntax errors are usual errors. Incorrect syntax causes parsing issues during the code interpretation. For example, add a semicolon instead of a colon in an object declaration. Syntax errors affect only the respective code thread. The remaining code works as it is. A grammatical mistake is the ultimate ... Read More