Posts tagged with "string"
20 posts found
Capitalize First Letter of a String - JavaScript
This article is about how to capitalize the first letter of a string using JavaScript.
#stringCheck if String starts with a space in JavaScript
Find out whether a string starts with a space or not using regex test method, string match method and startsWith method in JavaScript.
#stringJavaScript - Detect if a string contains any space
FInd out how to detect if a string contains any white space using regex test() method and string indexOf() method in Javascript.
#stringSplit a String into chunks of N character into an array in JavaScript
Find out how to split String into Substrings by length of N characters in JavaScript using split(), match() and substr() methods.
#stringHow to split string after specific character in JavaScript
Find out how to split the string at specific character in your string using split() method in JavaScript.
#stringCreate multiline string in JavaScript | Split string to Multilines
Find out how to create multiline string in JavaScript using string concatenation, blackslash and template literals.
#stringReplace all occurrences of a string in JavaScript
Tutorial on How to replace all occurrences of a string in JavaScript using replace() with regular expression (regex)
#stringHow to check if String contains only spaces in JavaScript
Quick way to check if a string contains only spaces or have empty string using trim() and regular expression using JavaScript.
#string5 ways to convert string to number in JavaScript
Find out how to convert a string to a number in JavaScript using parseInt(), parseFloat(), unary plus and math.round method.
#stringConvert array to string with brackets and quotes in JavaScript
Short article on how to convert an array to a string while preserving brackets and quotes.
#array#stringCompare Two Strings in JavaScript | String Comparison
Tutorial on how to compare two case insensitive strings in JavaScript. Using localeCompare() to do string comparison with case-sensitive strings.
#stringHow can I do String interpolation in JavaScript?
Article on different ways we can do string interpolation in JavaScript using template literals or string templates.
#stringJavaScript - How to Remove Character From A String.
Find out how to remove character from a string in JavaScript using replace() and split and join method.
#stringCheck if String Is a Number or Not in JavaScript
Tutorial on how can I check if a string is a valid number or not in JavaScript.
#stringHow to Remove Last Character from a string in javascript
This article is about how to remove last character from a string using JavaScript using splice() and substring() method.
#stringSort an array of String with non-ASCII characters.
This article is how to sort an array of string with non-ASCII characters. Using localeCompare() we can sort mixed array with non-ascii characters.
#string3 Ways to Combine Multiple Strings into a Single String | Concatenate Strings
This tutorial is about how to combine or join multiple strings in to a single string in javascript. we will learn three ways to concatenate add string in javascript.
#string3 Ways to generate random string/characters in JavaScript
We will learn about three ways on how to generate random strings/characters in javascript. We will use Math.random() method, shortid npm module and inbuilt method toString() method in javascript.
#stringHow to create Multiline string in JavaScript?
This article is about how to create multiline string or comment in javascript. To create multil-ine string we will be using template literals in javascript.
#stringGet the 10 characters from a string using Javascript.
How to get the first 10 character from a string using Javascript. Here we will extract the first 10 character from a string using the substring() method in javascript.
#string
