{"id":963,"date":"2022-07-22T10:12:25","date_gmt":"2022-07-22T09:12:25","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=963"},"modified":"2022-07-22T10:12:27","modified_gmt":"2022-07-22T09:12:27","slug":"javascript-string-cheatsheet-reference","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/","title":{"rendered":"JavaScript String Cheatsheet Reference"},"content":{"rendered":"\n<p>A string in Javascript represents a sequence of characters.<\/p>\n\n\n\n<p>Strings are useful for holding data that can be represented in textual forms. Some of the most-used operations on strings are to check their&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/length\"><code>length<\/code><\/a>, to build and concatenate them using the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Guide\/Expressions_and_Operators#string_operators\">+ and += string operators<\/a>, checking for the existence or location of substrings with the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/indexOf\"><code>indexOf()<\/code><\/a>&nbsp;method, or extracting substrings with the&nbsp;<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/substring\"><code>substring()<\/code><\/a>&nbsp;method.<\/p>\n\n\n\n<p>Whatever manipulation you need to do with Strings here are 12 Javascript String methods you can always reference.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-search\">1. search()<\/h2>\n\n\n\n<p>The&nbsp;<code>search()<\/code>&nbsp;method matches a string against a regular expression **<\/p>\n\n\n\n<p>It returns the index (position) of the first match.<\/p>\n\n\n\n<p>The&nbsp;<code>search()<\/code>&nbsp;method returns -1 if no match is found.<\/p>\n\n\n\n<p>The\u00a0<code>search()<\/code>\u00a0method is also case sensitive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example\">Example:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";  \nstr.search(\/[^\\w\\s]\/g);<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-split\">2. split()<\/h2>\n\n\n\n<p>The&nbsp;<code>split()<\/code>&nbsp;method splits a string into an array of substrings.<\/p>\n\n\n\n<p>The&nbsp;<code>split()<\/code>&nbsp;method returns the new array.<\/p>\n\n\n\n<p>The&nbsp;<code>split()<\/code>&nbsp;method does not change the original string.<\/p>\n\n\n\n<p>If (&#8221; &#8220;) is used as separator, the string is split between words.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-1\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";  \nstr.split(',');<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-repeat\">3. repeat()<\/h2>\n\n\n\n<p>The&nbsp;<code>repeat()<\/code>&nbsp;method returns a string with a number of copies of a string.<\/p>\n\n\n\n<p>The&nbsp;<code>repeat()<\/code>&nbsp;method returns a new string.<\/p>\n\n\n\n<p>The&nbsp;<code>repeat()<\/code>&nbsp;method does not change the original string.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-2\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">const str = \"The quick brown fox jumps over the lazy dog\";  \nstr.repeat(3);<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-4-length\">4. length<\/h2>\n\n\n\n<p>The&nbsp;<code>length<\/code>&nbsp;property returns the length of a string.<\/p>\n\n\n\n<p>The&nbsp;<code>length<\/code>&nbsp;property of an empty string is 0.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-3\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";  \nstr.length;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-5-replace\">5. replace()<\/h2>\n\n\n\n<p>The&nbsp;<code>replace()<\/code>&nbsp;method searches a string for a value or a regular expression.<\/p>\n\n\n\n<p>The&nbsp;<code>replace()<\/code>&nbsp;method returns a new string with the value(s) replaced.<\/p>\n\n\n\n<p>The&nbsp;<code>replace()<\/code>&nbsp;method does not change the original string.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-4\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";  \nstr.replace('o', 'a');<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-6-indexof\">6. indexOf()<\/h2>\n\n\n\n<p>The&nbsp;<code>indexOf()<\/code>&nbsp;method returns the position of the first occurrence of a value in a string.<\/p>\n\n\n\n<p>The&nbsp;<code>indexOf()<\/code>&nbsp;method returns -1 if the value is not found.<\/p>\n\n\n\n<p>The&nbsp;<code>indexOf()<\/code>&nbsp;method is case sensitive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-5\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";\nstr.indexOf('fox');<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-7-charat\">7. charAt()<\/h2>\n\n\n\n<p>The&nbsp;<code>charAt()<\/code>&nbsp;method in Ja returns the character at a specified index (position) in a string.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-6\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";\nstr.indexOf('fox');<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-8-startswith\">8. startsWith()<\/h2>\n\n\n\n<p>The\u00a0<code>startsWith()<\/code>\u00a0method returns\u00a0<code>true<\/code>\u00a0if a string starts with a specified string, otherwise it returns\u00a0<code>false<\/code>. The\u00a0<code>startsWith()<\/code>\u00a0method is case sensitive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-7\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";\nstr.startsWith(\"The\");<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-9-touppercase\">9. toUpperCase()<\/h2>\n\n\n\n<p>The\u00a0<code>toUpperCase()<\/code>\u00a0method converts a string to uppercase letters and does not change the original string.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-8\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";\nstr.toUpperCase();<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-10-tolowercase\">10. toLowerCase()<\/h2>\n\n\n\n<p>The\u00a0<code>toLowerCase()<\/code>\u00a0method converts a string to uppercase letters and does not change the original string.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-9\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const str = \"The quick brown fox jumps over the lazy dog\";\nstr.toLowerCase();<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-11-match\">11. match()<\/h2>\n\n\n\n<p>The&nbsp;<code>match()<\/code>&nbsp;method matches a string against a regular expression **<\/p>\n\n\n\n<p>The&nbsp;<code>match()<\/code>&nbsp;method returns an array with the matches.<\/p>\n\n\n\n<p>The&nbsp;<code>match()<\/code>&nbsp;method returns&nbsp;<em>null<\/em>&nbsp;if no match is found.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">const str = \"The quick brown fox jumps over the lazy dog\";\nstr.match(\/[A-Z]\/g);<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-see-also\">See Also:<\/h3>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-shorten-strings-with-three-dots\"><a href=\"https:\/\/codeflarelimited.com\/blog\/javascript-shorten-string-with-three-dots\" target=\"_blank\" rel=\"noreferrer noopener\">How to Shorten Strings With Three Dots<\/a><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be<\/p>\n","protected":false},"author":1,"featured_media":965,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11,98],"tags":[],"class_list":["post-963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-softare-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript String Cheatsheet Reference<\/title>\n<meta name=\"description\" content=\"A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript String Cheatsheet Reference\" \/>\n<meta property=\"og:description\" content=\"A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/codeflretech\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-22T09:12:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-22T09:12:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1570\" \/>\n\t<meta property=\"og:image:height\" content=\"1302\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"codeflare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeflaretech\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/\"},\"author\":{\"name\":\"codeflare\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\"},\"headline\":\"JavaScript String Cheatsheet Reference\",\"datePublished\":\"2022-07-22T09:12:25+00:00\",\"dateModified\":\"2022-07-22T09:12:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/\"},\"wordCount\":420,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/carbon.png\",\"articleSection\":[\"javascript\",\"softare development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/\",\"name\":\"JavaScript String Cheatsheet Reference\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/carbon.png\",\"datePublished\":\"2022-07-22T09:12:25+00:00\",\"dateModified\":\"2022-07-22T09:12:27+00:00\",\"description\":\"A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/carbon.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/carbon.png\",\"width\":1570,\"height\":1302,\"caption\":\"javascript string methods\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript-string-cheatsheet-reference\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"softare development\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/softare-development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript String Cheatsheet Reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\",\"name\":\"codeflare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"caption\":\"codeflare\"},\"description\":\"Latest tech news and coding tips.\",\"sameAs\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\",\"https:\\\/\\\/facebook.com\\\/codeflretech\",\"https:\\\/\\\/instagram.com\\\/codeflaretech\",\"https:\\\/\\\/x.com\\\/codeflaretech\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1\"],\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/watcher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript String Cheatsheet Reference","description":"A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript String Cheatsheet Reference","og_description":"A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms.","og_url":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/","article_author":"https:\/\/facebook.com\/codeflretech","article_published_time":"2022-07-22T09:12:25+00:00","article_modified_time":"2022-07-22T09:12:27+00:00","og_image":[{"width":1570,"height":1302,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png","type":"image\/png"}],"author":"codeflare","twitter_card":"summary_large_image","twitter_creator":"@codeflaretech","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/"},"author":{"name":"codeflare","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a"},"headline":"JavaScript String Cheatsheet Reference","datePublished":"2022-07-22T09:12:25+00:00","dateModified":"2022-07-22T09:12:27+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/"},"wordCount":420,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png","articleSection":["javascript","softare development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/","url":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/","name":"JavaScript String Cheatsheet Reference","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png","datePublished":"2022-07-22T09:12:25+00:00","dateModified":"2022-07-22T09:12:27+00:00","description":"A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms.","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png","width":1570,"height":1302,"caption":"javascript string methods"},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/javascript-string-cheatsheet-reference\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"softare development","item":"https:\/\/codeflarelimited.com\/blog\/softare-development\/"},{"@type":"ListItem","position":3,"name":"JavaScript String Cheatsheet Reference"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a","name":"codeflare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","caption":"codeflare"},"description":"Latest tech news and coding tips.","sameAs":["https:\/\/codeflarelimited.com\/blog","https:\/\/facebook.com\/codeflretech","https:\/\/instagram.com\/codeflaretech","https:\/\/x.com\/codeflaretech","https:\/\/www.youtube.com\/channel\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1"],"url":"https:\/\/codeflarelimited.com\/blog\/author\/watcher\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2022\/07\/carbon.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":2,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"predecessor-version":[{"id":966,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/963\/revisions\/966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/965"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}