{"id":616,"date":"2012-07-23T04:57:41","date_gmt":"2012-07-23T04:57:41","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=128"},"modified":"2012-07-23T04:57:41","modified_gmt":"2012-07-23T04:57:41","slug":"string-functions","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/string-functions\/","title":{"rendered":"String Functions"},"content":{"rendered":"<p><strong>How to Reverse a String<\/strong><\/p>\n<pre> strName = 'Michael';\n\n alert(reverse(strName));\n\n function reverse(s)\n  {\n    return s.split(\"\").reverse().join(\"\");\n  }\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<pre>\n leahciM\n<\/pre>\n<p>Split function Splits the String By Taking &#8220;&#8221; as Delimiter and Puts in a array.<br \/>\nThe Reverse function reverses the array<br \/>\nThe join function Joins the array(Character in each cell) again<\/p>\n<p><strong>How to Check if it is Numeric<\/strong><\/p>\n<pre>function isNumber(n) \n{\n  return !isNaN(parseFloat(n)) &amp;&amp; isFinite(n);\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to Reverse a String strName = &#8216;Michael&#8217;; alert(reverse(strName)); function reverse(s) { return s.split(&#8220;&#8221;).reverse().join(&#8220;&#8221;); } Output leahciM Split function Splits the String By Taking &#8220;&#8221; as Delimiter and Puts in a array. The Reverse function reverses the array The join function Joins the array(Character in each cell) again How to Check if it is Numeric&hellip; <a href=\"https:\/\/codethataint.com\/blog\/string-functions\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-616","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=616"}],"version-history":[{"count":0,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/616\/revisions"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}