{"id":1712,"date":"2022-07-18T19:12:34","date_gmt":"2022-07-18T19:12:34","guid":{"rendered":"https:\/\/gyanipandit.com\/programming\/?p=1712"},"modified":"2022-07-18T19:12:36","modified_gmt":"2022-07-18T19:12:36","slug":"javascript-string-uppercase-method","status":"publish","type":"post","link":"https:\/\/gyanipandit.com\/programming\/javascript-string-uppercase-method\/","title":{"rendered":"Javascript String Uppercase() Method"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>Javascript String Uppercase() Method<\/strong><\/p>\n<p>Sometimes, we need to convert our string, into uppercase, and in such situations, we can make use of the toUpperCase() method.<\/p>\n<p>This method is going to return a new string, converted to upper case. Remember that still, the original string is going to be as it was.<\/p>\n<p>Let&#8217;s have a look at some of the examples, which give us an idea of the toUpperCase method &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1713 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method.jpg\" alt=\"\" width=\"1358\" height=\"176\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method.jpg 1358w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-300x39.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-1024x133.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-768x100.jpg 768w\" sizes=\"auto, (max-width: 1358px) 100vw, 1358px\" \/><\/p>\n<p>As you can see, in the program, we have a string, and then we are calling the toUpperCase method for the string. Also, in the next instruction, we are printing the original string to the console.<\/p>\n<p>Now, the toUpperCase method returns the modified string, converted to uppercase. Let&#8217;s have a look at the output now as well &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1714 size-full\" src=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-1.jpg\" alt=\"\" width=\"1385\" height=\"182\" srcset=\"https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-1.jpg 1385w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-1-300x39.jpg 300w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-1-1024x135.jpg 1024w, https:\/\/gyanipandit.com\/programming\/wp-content\/uploads\/2022\/06\/Converting-string-to-uppercasetoUpperCase-method-1-768x101.jpg 768w\" sizes=\"auto, (max-width: 1385px) 100vw, 1385px\" \/><\/p>\n<p>As you can see, the output comes out to be as desired. The toUpperCase method returned a new modified string, and the original string is as it was. We can use this method, as and when required.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Javascript String Uppercase() Method Sometimes, we need to convert our string, into uppercase, and in such situations, we can make use of the toUpperCase() method. This method is going to return a new string, converted to upper case. Remember that still, the original string is going to be as it was. Let&#8217;s have a look [&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-1712","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\/1712","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=1712"}],"version-history":[{"count":2,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1712\/revisions"}],"predecessor-version":[{"id":2410,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/posts\/1712\/revisions\/2410"}],"wp:attachment":[{"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/media?parent=1712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/categories?post=1712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gyanipandit.com\/programming\/wp-json\/wp\/v2\/tags?post=1712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}