{"id":1716,"date":"2022-07-18T19:30:24","date_gmt":"2022-07-18T19:30:24","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=1716"},"modified":"2022-07-18T19:30:26","modified_gmt":"2022-07-18T19:30:26","slug":"string-to-lowercase-javascript","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/string-to-lowercase-javascript\/","title":{"rendered":"String to Lowercase Javascript"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>String toLowercase Javascript<\/strong><\/p>\n<p>In some situations, we need to convert our string, into lower case, and in such situations, there is a method, called as toLowerCase, for our help. As the name of the method says, the <strong>toLowerCase method<\/strong> is going to convert the string into lower case. Remember that this method is going to return a new string, which is the lowercase version of the given string, but the original string is going to be as it was.<\/p>\n<p>Now, let&#8217;s have a look at an example, which makes our idea clear, about the toLowerCase method.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1717 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method.jpg\" alt=\"\" width=\"1234\" height=\"171\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method.jpg 1234w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-300x42.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-1024x142.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-768x106.jpg 768w\" sizes=\"auto, (max-width: 1234px) 100vw, 1234px\" \/><br \/>\nAs you can see, in the above program, we have a string, and we are calling the method to lowercase, on the given string. Now, the toLowerCase method is going to return the string in the lowercase. But the thing is that the original string is going to be as it was. Let&#8217;s have a look at the output now &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1718 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-1.jpg\" alt=\"\" width=\"1365\" height=\"207\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-1.jpg 1365w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-1-300x45.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-1-1024x155.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-the-string-to-lower-casetoLowerCase-method-1-768x116.jpg 768w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/p>\n<p>As you can see, the first string is from the toLowerCase method, which is converted into the lower case, and then another string is the original string, which is there as it was. So, we can use the toLowerCase method, if you need to convert the string to lower case. This method can be used as required.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>String toLowercase Javascript In some situations, we need to convert our string, into lower case, and in such situations, there is a method, called as toLowerCase, for our help. As the name of the method says, the toLowerCase method is going to convert the string into lower case. Remember that this method is going to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[14,15],"class_list":{"0":"post-1716","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-javascript-tutorial","7":"tag-javascript","8":"tag-javascript-tutorial"},"_links":{"self":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/comments?post=1716"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1716\/revisions"}],"predecessor-version":[{"id":2411,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1716\/revisions\/2411"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=1716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=1716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=1716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}