{"id":7506,"date":"2021-08-06T12:54:06","date_gmt":"2021-08-06T12:54:06","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7506"},"modified":"2022-04-13T16:30:46","modified_gmt":"2022-04-13T16:30:46","slug":"what-is-node-js-in-javascript","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/","title":{"rendered":"What is the Purpose of the Node Object Property in JavaScript"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Properties of Node Object<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Node object represents a single node in the document tree.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>nodeName<\/strong><\/li><li><strong>nodeValue<\/strong><\/li><li><strong>nodeType<\/strong><\/li><li><strong>textContent<\/strong><\/li><li><strong>parentNode<\/strong><\/li><li><strong>childNodes<\/strong><\/li><li><strong>firstChild<\/strong><\/li><li><strong>lastChild<\/strong><\/li><li><strong>previousSibling<\/strong><\/li><li><strong>nextSibling<\/strong><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>nodeName<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The nodeName read-only property returns the name of the current node as a string.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>CDATASection                &#8220;#cdata-section&#8221;<\/li><li>Comment                       &#8220;#comment&#8221;<\/li><li>Document                      &#8220;#document&#8221;<\/li><li>DocumentFragment       &#8220;#document-fragment&#8221;<\/li><li>DocumentType                The value of DocumentType.name<\/li><li>Element                           The value of Element.tagName<\/li><li>Entity                               The entity name<\/li><li>EntityReference               The name of entity reference<\/li><li>Notation                          The notation name<\/li><li>ProcessingInstruction     The value of ProcessingInstruction.target<\/li><li>Text                                  &#8220;#text&#8221;<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>nodeValue<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The nodeValue property returns or sets the value of the current node.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>CDATASection                     content of the CDATA Section<\/li><li>Comment                            content of the comment<\/li><li>Document                           null<\/li><li>DocumentFragment            null<\/li><li>DocumentType                    null<\/li><li>Element                               null<\/li><li>NamedNodeMap                null<\/li><li>EntityReference                   null<\/li><li>Notation                              null<\/li><li>ProcessingInstruction         entire content excluding the target<\/li><li>Text                                     content of the text node<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>nodeType<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The read-only Node.nodeType property represents the type of the node.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Constant<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Node Type<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.ELEMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td>An element such as &lt;h1&gt; or &lt;div&gt;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.TEXT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">3<\/td><td>The actual Text of Element or Attribute ex: &#8211; \u201cHello\u201d<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.PROCESSING_INSTRUCTION_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">7<\/td><td>An instruction to a parser on aspect of the document &lt;?xml version=\u201c1.0\u201d?&gt;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.COMMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">8<\/td><td>A comment such as &lt; &#8211; &#8211; Something &#8211; &#8211; &gt;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.DOCUMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">9<\/td><td>A Document Node<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.DOCUMENT_TYPE_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">10<\/td><td>A doctype statement &lt;!DOCTYPE html&gt;<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Node.DOCUMENT_FRAGMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">11<\/td><td>A document fragment, which represents a lightweight structure to hold a collection of DOM nodes for manipulation or insertion.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Properties of Node Object The Node object represents a single node in the document tree. nodeName nodeValue nodeType textContent parentNode [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[16],"tags":[5095,1543,6016,6018,6017,1073],"class_list":["post-7506","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-javascript","tag-node","tag-node-object","tag-nodetype","tag-nodevalue","tag-properties"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is the Purpose of the Node Object Property in JavaScript - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the Purpose of the Node Object Property in JavaScript - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Properties of Node Object The Node object represents a single node in the document tree. nodeName nodeValue nodeType textContent parentNode [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-06T12:54:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-13T16:30:46+00:00\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"What is the Purpose of the Node Object Property in JavaScript\",\"datePublished\":\"2021-08-06T12:54:06+00:00\",\"dateModified\":\"2022-04-13T16:30:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/\"},\"wordCount\":258,\"commentCount\":0,\"keywords\":[\"Javascript\",\"Node\",\"Node Object\",\"nodeType\",\"nodeValue\",\"properties\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/\",\"name\":\"What is the Purpose of the Node Object Property in JavaScript - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2021-08-06T12:54:06+00:00\",\"dateModified\":\"2022-04-13T16:30:46+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-node-js-in-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is the Purpose of the Node Object Property in JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the Purpose of the Node Object Property in JavaScript - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"What is the Purpose of the Node Object Property in JavaScript - scmGalaxy","og_description":"Properties of Node Object The Node object represents a single node in the document tree. nodeName nodeValue nodeType textContent parentNode [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-06T12:54:06+00:00","article_modified_time":"2022-04-13T16:30:46+00:00","author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"What is the Purpose of the Node Object Property in JavaScript","datePublished":"2021-08-06T12:54:06+00:00","dateModified":"2022-04-13T16:30:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/"},"wordCount":258,"commentCount":0,"keywords":["Javascript","Node","Node Object","nodeType","nodeValue","properties"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/","name":"What is the Purpose of the Node Object Property in JavaScript - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2021-08-06T12:54:06+00:00","dateModified":"2022-04-13T16:30:46+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-node-js-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"What is the Purpose of the Node Object Property in JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7506"}],"version-history":[{"count":3,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7506\/revisions"}],"predecessor-version":[{"id":7556,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7506\/revisions\/7556"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}