{"id":5761,"date":"2021-03-24T12:23:25","date_gmt":"2021-03-24T12:23:25","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=5761"},"modified":"2021-03-24T12:24:41","modified_gmt":"2021-03-24T12:24:41","slug":"what-is-javascript","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/","title":{"rendered":"What is javascript"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Introduction:-<\/strong><em>javascript is an object oriented programming language used by several websites for scripting &nbsp;webpages. It is an interpreated programming language which enables dynamic interactivity on websites.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Features of javascript:-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>1.all the websites support javascript, they provide built in execution environment.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>2. it is a structured programming, it follows c programming language syntax and structure.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>3. it is a case sensitive programming language.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>4. it is a light weight interpreated language.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>5. it is supportable in several operating system including macOS, windows etc.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Places to put JavaScript code:-<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li><em>Between head tag.<\/em><\/li><li><em>Between body tag.<\/em><\/li><li><em>&nbsp;In external file(.js file)<\/em><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>javascriptComment<em>:-<\/em><\/strong><em> it is a meaningful way to deliver messange,warning,suggestion or information about the code .<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>there are 2 types of javascript comment:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li><em>Single-line comment<\/em><\/li><li><em>Multi-line comment<\/em><\/li><li><strong><em>Single line comment<\/em><\/strong><em>:-&nbsp; single line comment is used by adding forward slashes(\/\/) before the line.<\/em><\/li><li><strong><em>Multi line comment:-<\/em><\/strong><em> it is represented by forward slash with asterisk then asterisk with forward slash.<\/em><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Example<\/em><\/strong><em>:-\/* code is here*\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>JavaScript variable:- variable in javascript is a name of storage location.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>There are 2 types of variables:-<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li><em>Local variable<\/em><\/li><li><em>Global variable<\/em><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Local variable:-<\/strong> <em>Javascript local variable is declared inside the lock or function. It is accessible within the function or block.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Global variable<em>:-<\/em><\/strong><em> It is declared outside the function and accessible from any function<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Javascript datatypes:-<\/strong><em>Datatypes hold different types of values.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>There are two types of data types:-<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Primitive data type(string,number,Boolean undefined,null)<\/li><li>Non-primitive data type(object,Array,RegExp)<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Javascript operators:-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">.<em> javascript operators are the symbol which are used to perform operations on operands<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>1.Arithmetic Operators<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>2. Comparison (relational) operators<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>3. Bitwise Operators<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>4. logical Operatiors<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>5. Assignment Operators<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>6. Special Operators<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Javascript if-else:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>If else statement is used to execute wheather condition is true or false.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>There are three forms of if ststements in javascript<\/em>:-<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li><em>If statement<\/em><\/li><li><em>If else statement<\/em><\/li><li><em>If else if statement<\/em><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Introduction:-javascript is an object oriented programming language used by several websites for scripting &nbsp;webpages. It is an interpreated programming language [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1,156],"tags":[5095],"class_list":["post-5761","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-websites","tag-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is 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-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is javascript - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Introduction:-javascript is an object oriented programming language used by several websites for scripting &nbsp;webpages. It is an interpreated programming language [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-24T12:23:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-24T12:24:41+00:00\" \/>\n<meta name=\"author\" content=\"shashank K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"shashank K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\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-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/\"},\"author\":{\"name\":\"shashank K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/c88b513657ea9e9a6cd8a9b3a3bff6f3\"},\"headline\":\"What is javascript\",\"datePublished\":\"2021-03-24T12:23:25+00:00\",\"dateModified\":\"2021-03-24T12:24:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/\"},\"wordCount\":320,\"commentCount\":0,\"keywords\":[\"Javascript\"],\"articleSection\":{\"1\":\"Websites\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/\",\"name\":\"What is javascript - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2021-03-24T12:23:25+00:00\",\"dateModified\":\"2021-03-24T12:24:41+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/c88b513657ea9e9a6cd8a9b3a3bff6f3\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is 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\\\/c88b513657ea9e9a6cd8a9b3a3bff6f3\",\"name\":\"shashank K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g\",\"caption\":\"shashank K\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/shashank\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is 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-javascript\/","og_locale":"en_US","og_type":"article","og_title":"What is javascript - scmGalaxy","og_description":"Introduction:-javascript is an object oriented programming language used by several websites for scripting &nbsp;webpages. It is an interpreated programming language [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/","og_site_name":"scmGalaxy","article_published_time":"2021-03-24T12:23:25+00:00","article_modified_time":"2021-03-24T12:24:41+00:00","author":"shashank K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"shashank K","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/"},"author":{"name":"shashank K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/c88b513657ea9e9a6cd8a9b3a3bff6f3"},"headline":"What is javascript","datePublished":"2021-03-24T12:23:25+00:00","dateModified":"2021-03-24T12:24:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/"},"wordCount":320,"commentCount":0,"keywords":["Javascript"],"articleSection":{"1":"Websites"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/","name":"What is javascript - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2021-03-24T12:23:25+00:00","dateModified":"2021-03-24T12:24:41+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/c88b513657ea9e9a6cd8a9b3a3bff6f3"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"What is 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\/c88b513657ea9e9a6cd8a9b3a3bff6f3","name":"shashank K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g","caption":"shashank K"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/shashank\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5761","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\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=5761"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5761\/revisions"}],"predecessor-version":[{"id":5762,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/5761\/revisions\/5762"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=5761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=5761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=5761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}