{"id":391,"date":"2012-11-23T10:36:36","date_gmt":"2012-11-23T10:36:36","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=391"},"modified":"2012-11-23T10:36:36","modified_gmt":"2012-11-23T10:36:36","slug":"how-to-convert-a-variable-to-string-in-javascript","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/how-to-convert-a-variable-to-string-in-javascript\/","title":{"rendered":"How to convert a variable to string in javascript"},"content":{"rendered":"<p>The toString() method is used for converting variable into string.<\/p>\n<pre>\n  var num = 15;\n  var a = num.toString();\n  var b = num.toString(2);\n  var c = num.toString(8);\n  var d = num.toString(16);\n<\/pre>\n<p>The Results are as Below<\/p>\n<pre>\n 15\n 1111\n 17\n f \n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The toString() method is used for converting variable into string. var num = 15; var a = num.toString(); var b = num.toString(2); var c = num.toString(8); var d = num.toString(16); The Results are as Below 15 1111 17 f<\/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-391","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/391","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=391"}],"version-history":[{"count":0,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/391\/revisions"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}