{"id":22507,"date":"2020-09-11T16:55:38","date_gmt":"2020-09-11T23:55:38","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=22507"},"modified":"2020-09-11T16:55:41","modified_gmt":"2020-09-11T23:55:41","slug":"javascript-hello-world","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/","title":{"rendered":"JavaScript \u2013 Hello World"},"content":{"rendered":"\n<p>One of the very first programs you can write to make sure your Node version works is the \u201cHello World\u201d program. There are two ways to create the program:&nbsp; in the terminal or in your code editor of choice (i.e. Visual Studio Code, Vim, etc.). Make sure you have Node installed on your machine to get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Terminal<\/h2>\n\n\n\n<p>1.In your terminal, type <code>node<\/code> to start Node.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/M4NbKXLsgSuM6zE3BhFTi-AUX44zhR987KI4PKGO5mn2oKyKNI5VgrbgM--ieAQWoO1hiWM62Znc8x4Z4ptm82_NaZ_e-rL-VgBGPFIKv13Csj0citZvwllDwM9facWCd62ZTZRj\" alt=\"How the terminal should look after starting Python 3\"\/><figcaption> How the terminal should look after starting Node.\u00a0 <\/figcaption><\/figure>\n\n\n\n<p>2.Input console.log(\u201cHello World\u201d) into the Interpreter and hit enter.\u00a0<\/p>\n\n\n\n<p>3.Hello World will show up on the next line! Don\u2019t worry if it says \u201cundefined\u201d in the following line. That just means we haven\u2019t returned anything from a function.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/BK84e7lOP69NXLJQ7Ay4Zq7QfiwHpKRa_kuMed0p1OvTwRRjhrk2mSE9aL0DmqT_tzIS6CHBKT-thdvdk10GU9Mv6VUtHcmMI43seDTvGKOD-fus3jM9282TrQV_eUC444mRIXuj\" alt=\"\"\/><\/figure>\n\n\n\n<p>4.If you would like to create a function to test, you can do that too! Here\u2019s how to do that in the terminal:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/vo_DVBO_baNAU_O1MAGHVB6i_XLHn9gcFgMxEfBe1tiMBX8G8V2iBzXAyilN5Y9zs0YpRa7xz6zjBxp0FTaCLlGOb1XiJLxvTlxpFFOMBmeLTQvknOi0TcRQOhTrs5wiIQAchHP0\" alt=\"\"\/><\/figure>\n\n\n\n<p>Node will store the function in memory. If you want to run it, just type <code>helloWorld()<\/code> in the terminal and hit enter. It\u2019ll return Hello World! in the console.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Code Editor (i.e. Visual Studio Code)<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Open up your editor of choice and create a new file and save it as&nbsp; hello.js.<\/li><li>In your file, input console.log(\u201cHello World\u201d) into the file and save it.&nbsp;<\/li><li>In your terminal, navigate to the directory\/folder you saved your file. Use cd and ls to navigate from directory to directory.&nbsp;<\/li><li>Use node hello.js to run the file. Hello World should show up on the next line.&nbsp;<\/li><li>If you are using VS Code, the \u201cplay\u201d button in the upper right hand corner will also run the current file and show the output on the lower half of the screen.&nbsp;<\/li><\/ol>\n\n\n\n<p>That\u2019s it! You have successfully created a simple program in JavaScript that shows that your Node environment works.<\/p>\n","protected":false},"excerpt":{"rendered":"One of the very first programs you can write to make sure your Node version works is the \u201cHello World\u201d program. There are two ways to create the program:&nbsp; in the terminal or in your code editor of choice (i.e. Visual Studio Code, Vim, etc.). Make sure you have Node installed on your machine to&hellip;","protected":false},"author":77,"featured_media":22508,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-22507","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"JavaScript","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":[]},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>JavaScript: Hello World | Career Karma<\/title>\n<meta name=\"description\" content=\"Learn how to create a small program to make sure that your Node.js environment works on Career Karma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript \u2013 Hello World\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a small program to make sure that your Node.js environment works on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-11T23:55:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-11T23:55:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Christina Kopecky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christina Kopecky\" \/>\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:\/\/careerkarma.com\/blog\/javascript-hello-world\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\"},\"author\":{\"name\":\"Christina Kopecky\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\"},\"headline\":\"JavaScript \u2013 Hello World\",\"datePublished\":\"2020-09-11T23:55:38+00:00\",\"dateModified\":\"2020-09-11T23:55:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\"},\"wordCount\":306,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\",\"name\":\"JavaScript: Hello World | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg\",\"datePublished\":\"2020-09-11T23:55:38+00:00\",\"dateModified\":\"2020-09-11T23:55:41+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\"},\"description\":\"Learn how to create a small program to make sure that your Node.js environment works on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/careerkarma.com\/blog\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript \u2013 Hello World\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e\",\"name\":\"Christina Kopecky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg\",\"caption\":\"Christina Kopecky\"},\"description\":\"Christina is an experienced technical writer, covering topics as diverse as Java, SQL, Python, and web development. She earned her Master of Music in flute performance from the University of Kansas and a bachelor's degree in music with minors in French and mass communication from Southeast Missouri State. Prior to joining the Career Karma team in June 2020, Christina was a teaching assistant, team lead, and section lead at Lambda School, where she led student groups, performed code and project reviews, and debugged problems for students. Christina's technical content is featured frequently in publications like Codecademy, Repl.it, and Educative.\",\"sameAs\":[\"http:\/\/www.linkedin.com\/in\/cmvnk\"],\"url\":\"https:\/\/careerkarma.com\/blog\/author\/christina-kopecky\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JavaScript: Hello World | Career Karma","description":"Learn how to create a small program to make sure that your Node.js environment works on Career Karma.","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:\/\/careerkarma.com\/blog\/javascript-hello-world\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript \u2013 Hello World","og_description":"Learn how to create a small program to make sure that your Node.js environment works on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-09-11T23:55:38+00:00","article_modified_time":"2020-09-11T23:55:41+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg","type":"image\/jpeg"}],"author":"Christina Kopecky","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Christina Kopecky","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/"},"author":{"name":"Christina Kopecky","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e"},"headline":"JavaScript \u2013 Hello World","datePublished":"2020-09-11T23:55:38+00:00","dateModified":"2020-09-11T23:55:41+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/"},"wordCount":306,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/","url":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/","name":"JavaScript: Hello World | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg","datePublished":"2020-09-11T23:55:38+00:00","dateModified":"2020-09-11T23:55:41+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e"},"description":"Learn how to create a small program to make sure that your Node.js environment works on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-hello-world\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/09\/nasa-1lfI7wkGWZ4-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-hello-world\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/careerkarma.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript \u2013 Hello World"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/ae0cdc4a5d198690d78482646894074e","name":"Christina Kopecky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/image-3-150x150.jpg","caption":"Christina Kopecky"},"description":"Christina is an experienced technical writer, covering topics as diverse as Java, SQL, Python, and web development. She earned her Master of Music in flute performance from the University of Kansas and a bachelor's degree in music with minors in French and mass communication from Southeast Missouri State. Prior to joining the Career Karma team in June 2020, Christina was a teaching assistant, team lead, and section lead at Lambda School, where she led student groups, performed code and project reviews, and debugged problems for students. Christina's technical content is featured frequently in publications like Codecademy, Repl.it, and Educative.","sameAs":["http:\/\/www.linkedin.com\/in\/cmvnk"],"url":"https:\/\/careerkarma.com\/blog\/author\/christina-kopecky\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=22507"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/22507\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/22508"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=22507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=22507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=22507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}