- 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 448 Articles for Programming Scripts
![Nikitha N](https://www.tutorialspoint.com/assets/profiles/13558/profile/60_76068-1512713229.jpg)
625 Views
To find a tab character with JavaScript Regular Expression, use the following −\tExampleYou can try to run the following code to find a tab character. It returns the position where the tab (\t) character is found − JavaScript Regular Expression var myStr = "Simple \t Responsive!"; var reg = /\t/; var match = myStr.search(reg); document.write(match);
![Rishi Rathor](https://www.tutorialspoint.com/assets/profiles/13563/profile/60_89283-1512714754.jpg)
50 Views
JavaScript date setUTCMonth ( ) method sets the month for a specified date according to universal time.The following is the parameter of setUTCMonth ( monthvalue ) method in JavaScript −monthValue − An integer between 0 and 11, representing the month.ExampleYou can try to run the following code to set the month for a specified date according to universal time − JavaScript getUTCSeconds Method var dt = new Date( "Aug 28, 2008 13:30:00" ); dt.setUTCMonth( 2 ); document.write( dt );
![Alankritha Ammu](https://www.tutorialspoint.com/assets/profiles/13523/profile/60_83090-1512649277.jpg)
76 Views
JavaScript date setUTCMinutes() method sets the minutes for a specified date according to universal time.The following are the parameters for setUTCMinutes(minutesValue[, secondsValue[, msValue]]) method −minutesValue − An integer between 0 and 59, representing the minutes.secondsValue − An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter, you must also specify the minutesValue.msValue − A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter, you must also specify the minutesValue and secondsValue.ExampleYou can try to run the following code to set the minutes for a specified date according to universal time ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
58 Views
To return a string representing the source for an equivalent Date object, use the JavaScript toSource() method. This method returns a string representing the source code of the object.ExampleYou can try to run the following code to return a string representing the source for an equivalent Date object − JavaScript toSource() Method var dt = new Date(2018, 0, 15, 14, 39, 7); document.write( "Formated Date : " + dt.toSource() );
![Priya Pallavi](https://www.tutorialspoint.com/assets/profiles/13562/profile/60_91320-1512544134.jpg)
62 Views
To return the "time" portion of the Date as a string, using the current locale's conventions, use the toLocaleTimeString() method.The toLocaleTimeString method relies on the underlying operating system in formatting dates. It converts the date to a string using the formatting convention of the operating system where the script is running. For example, in the United States, the month appears before the date (04/15/98), whereas in Germany, the date appears before the month (15.04.98).ExampleYou can try to run the following code to return the “time” portion of the Date as a string − JavaScript toLocaleTimeString ... Read More
![Rama Giri](https://www.tutorialspoint.com/assets/profiles/13881/profile/60_68188-1512710896.jpg)
88 Views
JavaScript date setUTCSeconds() method sets the seconds for a specified date according to universal time.The following are the parameters for setUTCSeconds(secondsValue[, msValue]) methodLsecondsValue − An integer between 0 and 59, representing the seconds.msValue − A number between 0 and 999, representing the milliseconds.ExampleYou can try to run the following code to set seconds for a specified date − JavaScript setUTCSeconds Method var dt = new Date( "Aug 28, 2008 13:30:00" ); dt.setUTCSeconds( 65 ); document.write( dt );
![Sravani S](https://www.tutorialspoint.com/assets/profiles/13538/profile/60_67753-1512711355.jpg)
99 Views
A regular expression is an object that describes a pattern of characters.The JavaScript RegExp class represents regular expressions, and both String and RegExp define methods that use regular expressions to perform powerful pattern-matching and search-and-replace functions on the text. A regular expression could be defined with the RegExp () constructor, as follows −var pattern = new RegExp(pattern, attributes); or var pattern = /pattern/attributes;The following are the parameters −pattern − A string that specifies the pattern of the regular expression or another regular expression.attributes − An optional string containing any of the "g", "i", and "m" attributes that specify ... Read More
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
102 Views
To convert a date to a string using the universal time convention, use the toUTCString() method. It returns converted the date to a string, using the universal time convention.ExampleYou can try to run the following code to learn how to convert a date to a string using UTC − JavaScript toUTCString Method var dateobject = new Date(2018, 0, 15, 14, 39, 7); document.write( dateobject.toUTCString() );
![Sai Nath](https://www.tutorialspoint.com/assets/profiles/13525/profile/60_63072-1512539005.jpg)
55 Views
To return the “time” portion of the Date as a human-readable string, use the toTimeString() method in JavaScript. This method returns the time portion of a Date object in the human-readable form.ExampleYou need to run the following code to return only the time portion of a Date − JavaScript toTimeString Method var dateobject = new Date(2018, 0, 1, 14, 39, 7); document.write( dateobject.toTimeString() );
![Abhinanda Shri](https://www.tutorialspoint.com/assets/profiles/13552/profile/60_73264-1512711555.jpg)
39 Views
ignoreCase is a read-only boolean property of RegExp objects. It specifies whether a particular regular expression performs case-insensitive matching, i.e., whether it was created with the "i" attribute.ExampleYou can try to run the following code to learn how to work with Ignore Case RegExp property in JavaScript. JavaScript RegExp ignoreCase Property var re = new RegExp( "string" ); if ( re.ignoreCase ) { document.write("Test1-ignoreCase property is set"); } ... Read More