{"id":66776,"date":"2022-08-24T09:02:28","date_gmt":"2022-08-24T07:02:28","guid":{"rendered":"https:\/\/eiposgrados.com\/?p=66776"},"modified":"2022-08-30T09:16:27","modified_gmt":"2022-08-30T07:16:27","slug":"create-your-first-hello-world-with-javascript","status":"publish","type":"post","link":"https:\/\/eiposgrados.com\/eng\/blog-web-development\/create-your-first-hello-world-with-javascript\/","title":{"rendered":"Create your first hello world with JavaScript"},"content":{"rendered":"<p>Today we bring you something different, we are going to do a small \u201ctutorial\u201d to start programming JavaScript and generate our first \u201cHello world\u201d. We have opted for Visual Studio Code, to download it, we have to go to <a href=\"https:\/\/code.visualstudio.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/code.visualstudio.com\/download<\/a> and there we will select our operating system and file system.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"751\" height=\"424\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-2.png\" alt=\"Image\" class=\"wp-image-66778\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-2.png 751w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-2-300x169.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-2-292x165.png 292w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-2-123x69.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-2-200x113.png 200w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/figure>\n\n\n\n<p>Visual Studio Code allows us to use extensions to make your work easier when it comes to \u201cchopping\u201d code and previewing pages. In our case we are going to install 2 extensions, to do this we go to the extensions section, we write the name of the extension and in the part that appears on the right we click to install it. The first of them will be <em>Prettytier. <\/em>This extension will format our code so that it looks cleaner and is easier to understand. It works for both JavaScript and <strong>Html <\/strong>either <strong>css<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"691\" height=\"354\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-3.png\" alt=\"Image\" class=\"wp-image-66779\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-3.png 691w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-3-300x154.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-3-123x63.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-3-200x102.png 200w\" sizes=\"(max-width: 691px) 100vw, 691px\" \/><\/figure>\n\n\n\n<p>The second extension will be Live Server. With it we can visualize the changes we make to a web page in real time. Live Server executes the file that we are modifying in an explorer, updating it with each change in the file (Remember to check auto-save). It is installed in the same way as the previous one.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"821\" height=\"327\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-4.png\" alt=\"Image\" class=\"wp-image-66780\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-4.png 821w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-4-300x119.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-4-768x306.png 768w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-4-123x49.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-4-200x80.png 200w\" sizes=\"(max-width: 821px) 100vw, 821px\" \/><\/figure>\n\n\n\n<p>We could install a multitude of more extensions, but with these two we can begin to program our <strong>Hello World.<\/strong><\/p>\n\n\n\n<p>The next thing we are going to do is create a folder to save our project. In my case, I created the test folder on the desktop and dragged it to the <strong>Explorer. <\/strong>Once we have the folder created we just have to click create file and name it index.html for example.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"387\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-5.png\" alt=\"Image\" class=\"wp-image-66781\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-5.png 772w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-5-300x150.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-5-768x385.png 768w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-5-123x62.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-5-200x100.png 200w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p>Now inside our <em>index <\/em>We write html and from the options, we choose html5 to generate the basic block of a web page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"523\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-6.png\" alt=\"Image\" class=\"wp-image-66782\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-6.png 671w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-6-300x234.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-6-212x165.png 212w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-6-123x96.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-6-200x156.png 200w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><\/figure>\n\n\n\n<p>Finally, what we are going to do is within the &lt;body&gt; create the label &lt;script&gt; que nos permitir&aacute; ejecutar el c&oacute;digo JavaScript que escribamos dentro. Te muestro el ejemplo finalizado, hemos cambiado el t&iacute;tulo de la p&aacute;gina, le hemos dado un encabezado y por &uacute;ltimo generamos nuestro c&oacute;digo JavaScript. A la derecha de la imagen podemos ver la vista generada en el navegador, para ello deb&eacute;is dar bot&oacute;n derecho en el c&oacute;digo y clickear en <strong>Open with Live Server<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"252\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7-1024x252.png\" alt=\"Image\" class=\"wp-image-66783\" title=\"\" srcset=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7-1024x252.png 1024w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7-300x74.png 300w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7-768x189.png 768w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7-123x30.png 123w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7-200x49.png 200w, https:\/\/eiposgrados.com\/wp-content\/uploads\/2022\/08\/image-7.png 1090w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If you like the world of programming and want to stand out from the rest of the developers, we recommend our <a href=\"https:\/\/eiposgrados.com\/eng\/programs\/master-in-fullstack-web-development\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Master in Fullstack Web Development<\/strong><\/a><strong>, <\/strong>where you can learn from scratch and with the possibility of internships in companies. Learn with the best. We will wait for you!!<\/p>","protected":false},"excerpt":{"rendered":"<p>Today we bring you something different, we are going to do a small \u201ctutorial\u201d to start programming JavaScript and generate our first \u201cHello world\u201d. We have\u2026 <a title=\"Create your first hello world with JavaScript\" class=\"read-more\" href=\"https:\/\/eiposgrados.com\/eng\/blog-web-development\/create-your-first-hello-world-with-javascript\/\" aria-label=\"Read more about Create your first hello world with JavaScript\">Read more<\/a><\/p>","protected":false},"author":90,"featured_media":66810,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[419,1149],"tags":[],"class_list":["post-66776","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-desarrollo-web","category-blog-desarrollo-web-fullstack"],"acf":[],"_links":{"self":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/66776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/comments?post=66776"}],"version-history":[{"count":0,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/66776\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media\/66810"}],"wp:attachment":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media?parent=66776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/categories?post=66776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/tags?post=66776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}