{"id":11977,"date":"2025-02-05T07:04:07","date_gmt":"2025-02-05T07:04:07","guid":{"rendered":"https:\/\/www.bacancytechnology.com\/qanda\/?p=11977"},"modified":"2025-02-05T07:04:07","modified_gmt":"2025-02-05T07:04:07","slug":"multi-line-string-in-node-js","status":"publish","type":"post","link":"https:\/\/www.bacancytechnology.com\/qanda\/node\/multi-line-string-in-node-js","title":{"rendered":"Multi-line String in Node.js"},"content":{"rendered":"<p>In modern Node.js (and JavaScript in general), multi-line strings are natively supported using template literals introduced in ES6 (ECMAScript 2015). These allow multi-line strings directly and work in both Node.js and modern browsers.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"kotlin\">const multiLineString = `\r\nThis is a multi-line string.\r\nYou don't need any special syntax\r\nlike \\n\\ for new lines.\r\nIt works natively!`;\r\n\r\nconsole.log(multiLineString);\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In modern Node.js (and JavaScript in general), multi-line strings are natively supported using template literals introduced in ES6 (ECMAScript 2015). These allow multi-line strings directly and work in both Node.js and modern browsers. const multiLineString = ` This is a multi-line string. You don&#8217;t need any special syntax like \\n\\ for new lines. It works [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11978,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-11977","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-node"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/11977"}],"collection":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/comments?post=11977"}],"version-history":[{"count":1,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/11977\/revisions"}],"predecessor-version":[{"id":11979,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/posts\/11977\/revisions\/11979"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/media\/11978"}],"wp:attachment":[{"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/media?parent=11977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/categories?post=11977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bacancytechnology.com\/qanda\/wp-json\/wp\/v2\/tags?post=11977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}