{"id":11973,"date":"2020-03-03T11:01:10","date_gmt":"2020-03-03T19:01:10","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=11973"},"modified":"2023-12-01T02:31:12","modified_gmt":"2023-12-01T10:31:12","slug":"javascript-for-beginners-handbook","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/","title":{"rendered":"JavaScript for Beginners: A Handbook"},"content":{"rendered":"\n<p>JavaScript is a programming language that\u2019s used to create dynamic content on websites.<\/p>\n\n\n\n<p>Take a moment to think about the web features you use every day. Think about how new content loads when you keep scrolling on Twitter, or how YouTube updates when you click on the <code>like<\/code> button. This is JavaScript at work. JavaScript can be used to create interactive forms, animate images, create responsive elements, and more depending on your needs.<\/p>\n\n\n\n<p>When you\u2019re developing a website, there are three main web technologies you\u2019ll use: <code>HTML<\/code>, <code>CSS<\/code>, and <code>JavaScript<\/code>. You will use <code>HTML<\/code> to determine the structure of a webpage, and <code>CSS<\/code> to control how a web page appears. <code>JavaScript<\/code> is the third element of web development that you can use to make your site dynamic.<\/p>\n\n\n\n<p>And that\u2019s not all JavaScript can do. If you want to build more than a static web page, you\u2019ll want to use JS. But JavaScript can also be used in back-end web development, or to develop games, or to create mobile applications.&nbsp;<\/p>\n\n\n\n<p>In this guide, we are going to break down some of the most common operations you may encounter as you learn JavaScript. We\u2019ll discuss JavaScript fundamentals, including substrings, testing your code with <code>try...catch<\/code> blocks, using if statements, and more. After we\u2019ve covered the basics, we\u2019ll also go onto explore some more advanced JavaScript functions.<\/p>\n\n\n\n<p>If you have just started to <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-javascript\/\">learn JavaScript<\/a> and are looking for an introductory tutorial, look no further than this guide! We have provided a list of some of the <a href=\"https:\/\/careerkarma.com\/blog\/online-javascript-courses\/\">best online JavaScript courses<\/a> to help you. Let\u2019s start exploring some of the most common operations in JavaScript.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-filter-and-reduce\">JavaScript Filter and Reduce<\/h2>\n\n\n\n<p>When you\u2019re working with an array in JavaScript, you may want to filter your objects or run a calculation on items within the array. That\u2019s where the <code>filter()<\/code> and <code>reduce()<\/code> functions come in, respectively.<\/p>\n\n\n\n<p>The <code>filter()<\/code> function can be used to get values that meet particular criteria from an array. Here\u2019s an example of a filter function that returns all students in <code>First Grade<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var firstGradeStudents = students.filter(function (student) {\n\treturn student.class === \u201cFirst Grade\u201d;\n});<\/pre><\/div>\n\n\n\n<p>The <code>reduce()<\/code> method can be used to reduce an array down to a single value. For example, if we want to get the total age of students in a class, we could use this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var firstGradeStudents = students.filter(function (student) {\n\treturn student.class === \u201cFirst Grade\u201d;\n});<\/pre><\/div>\n\n\n\n<p>Check out our full guide on these functions to learn more about how they work, and how you can use them in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-string-contains\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-string-contains\">JavaScript String Contains<\/a><\/h2>\n\n\n\n<p>Strings are used in programming to display and work with text. When you\u2019re working with a string, you may want to check whether or not that string contains a certain value. For example, you may want to check whether or not someone\u2019s name contains <code>Jones<\/code>.<\/p>\n\n\n\n<p>You can use the built-in <code>includes()<\/code> method in JavaScript to check whether a string contains a substring. Here\u2019s an example of the <code>includes()<\/code> method being used to check if a string contains a substring:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>let str = \u201cExample String!\u201d;\nlet ourSubstring = \u201cExample\u201d;\nstr.includes(ourSubstring);<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-split-and-slice\">JavaScript Split and Slice<\/h2>\n\n\n\n<p>Often, you may have a string that you want to split up into a substring or an array. To do this, you can use the <code>split()<\/code> and <code>slice()<\/code> JavaScript functions.<\/p>\n\n\n\n<p>The <code>split()<\/code> function allows you to split a string into an array. For example, if you wanted to convert a user\u2019s full name into an array of strings, you could use the <code>split()<\/code> function. Here\u2019s an example of <code>split()<\/code> in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var fullName = \u201cForename Surname\u201d;\nvar fullNameSplit = fullName.split(\u201c \u201c);\nconsole.log(fullNameSplit);<\/pre><\/div>\n\n\n\n<p>The <code>slice()<\/code> method returns all characters between two index numbers in a string, allowing you to create a substring. Here\u2019s an example of slice in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>\"John Appleseed\".slice(5, 10);<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-splice\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-splice\">JavaScript Splice<\/a><\/h2>\n\n\n\n<p>The JavaScript <code>splice()<\/code> method can be used to add or remove an item from any place within an array. For example, if you have a list of employee names and you want to remove the second one on the list, you could use <code>splice()<\/code>.<\/p>\n\n\n\n<p>Here\u2019s an example of <code>splice()<\/code> being used to remove the name <code>Paul<\/code>, which has the index value <code>3<\/code>, from an array:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var students = [\u201cAlex\u201d, \u201cFred\u201d, \u201cMolly\u201d, \u201cPaul\u201d]\nstudents.splice(3, 1);\nconsole.log(students);<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-substring\">JavaScript Substring<\/h2>\n\n\n\n<p>The <code>substring()<\/code> JavaScript method allows you to extract parts of a string and create a substring out of those parts. For example, if you wanted to get the last two characters in someone\u2019s surname, you could use the <code>substring()<\/code> method.<\/p>\n\n\n\n<p>Here\u2019s an example of substring being used to remove the first two characters from a string:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>const catName = \u201cPickles\u201d;\nconst newCatName = catName.substring(2);\nconsole.log(newCatName);<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-try-catch\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-try-catch\">JavaScript Try Catch<\/a><\/h2>\n\n\n\n<p>Every developer makes mistakes when they are coding, and it\u2019s very important to make sure that if an error appears, it\u2019s handled appropriately. Try\/catch blocks are used in JavaScript to handle errors.<\/p>\n\n\n\n<p>When a try\/catch block is used, your code will be run and will return a custom response if an error is encountered in your code. Here is an example of a try\/catch procedure in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>try {\n\/\/ Your code here\n\tconsole.log(\"The code works!\");\n} catch (e) {\n\tconsole.log(\"There is a problem in my code!\");\n}<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-if-else\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-if-else\">JavaScript If Else<\/a><\/h2>\n\n\n\n<p>Conditional statements are used when you want code to run only when a certain set of criteria are met. For example, you may want your program to print out a user\u2019s name if they have entered a valid name and return a message to the user in the web browser if their name is invalid.<\/p>\n\n\n\n<p>The <code>if\/else<\/code> statement can be used to run certain code if a statement is true, and run a different block of code if a statement is false. Here\u2019s the syntax of an <code>if\/else<\/code> statement:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>if (ourCondition) {\n\t\/\/ Code will execute if the condition is true\n} else {\n\t\/\/ Code will execute if the condition is false\n}<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-string-replace\">JavaScript String Replace<\/h2>\n\n\n\n<p>The JavaScript <code>replace()<\/code> function can be used to replace certain characters\u2014or sequences of characters\u2014in a string of text. For example, you could use <code>replace()<\/code> to change every occurrence of a user\u2019s email address in a string if the user has changed their email.<\/p>\n\n\n\n<p>Here\u2019s an example of how you can use <code>replace()<\/code> in JavaScript to replace text:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var ourInterestingString = \"This string is interesting.\";\nvar ourIntriguingString = ourInterestingString.replace(\"interesting\", \"intriguing\");\nconsole.log(ourIntriguingString);<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-onclick\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-onclick\">JavaScript Onclick<\/a><\/h2>\n\n\n\n<p>When you\u2019re creating a webpage, you may want an element to do something when a user clicks on it. For example, you may want a user to receive a message if they click on a button, or for an image to enlarge it\u2019s clicked. That\u2019s where the <code>onclick()<\/code> function comes in.<\/p>\n\n\n\n<p>The <code>onclick()<\/code> event allows you to make a web page interactive so that if a user clicks on an element, something will happen. Read our guide on the <code>onclick()<\/code> event to learn more about how it works and how you can use it in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-sort-array\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-sort-array\">JavaScript Sort Array<\/a><\/h2>\n\n\n\n<p>When you\u2019re working with an array, you may decide that you want to order the array in a particular way. For example, you may want to order a list of names in alphabetical order, or a list of grades in ascending order.<\/p>\n\n\n\n<p>The JavaScript <code>sort()<\/code> function can be used to arrange an array in a particular way. Here\u2019s an example of the <code>sort()<\/code> function being used to arrange an array of student names in alphabetical order:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var students = ['Alex', 'Cathy', 'Lincoln', 'Jeff'];\nvar sorted_students = students.sort();\nconsole.log(sorted_students);<\/pre><\/div>\n\n\n\n<p>The <code>sort()<\/code> function can also be used to perform advanced sorts if you define a custom function within the sort.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-ternary-operator\">JavaScript Ternary Operator<\/h2>\n\n\n\n<p>JavaScript ternary operators are <code>if...else<\/code> statements that check if a condition is met, and run a block of code. For example, if you want to check a user\u2019s age and return <code>true<\/code> if they are over 18 and <code>false<\/code> if they are under 18, you could use a ternary operator.<\/p>\n\n\n\n<p>Ternary operators are often used in place of simple <code>if...else<\/code> statements because they are compact and fit on one line.<\/p>\n\n\n\n<p>Here\u2019s the syntax for a ternary operator in JavaScript:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>(condition) ? if true, then run : if false, then run<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-foreach\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-foreach-loop\/\">JavaScript forEach<\/a><\/h2>\n\n\n\n<p>When you\u2019re programming in JavaScript, you may want to loop through all the items within a list. For example, you may have a list of supplier names that you want to print out to the user. You can use the <code>forEach<\/code> loop to build this function.<\/p>\n\n\n\n<p>A <code>forEach<\/code> loop is a form of <code>for<\/code> loop that executes a function once on each item in an array. Here\u2019s the syntax for a <code>forEach<\/code> statement that loops through a list of companies and prints each one out on a new line:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>const companies = ['Apple', 'Google', 'Facebook'];\ncompanies.forEach(company =&gt; {\n\tconsole.log(company);\n});<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-functions\"><a href=\"https:\/\/careerkarma.com\/blog\/how-to-use-javascript-functions\/\">JavaScript Functions<\/a><\/h2>\n\n\n\n<p>Functions, which are part of most major programming languages, allow you to write code once for common processes and use that code multiple times within your program.<\/p>\n\n\n\n<p>For example, if you have a block of code that checks if a form field is valid, you may want to make it a function, so you don\u2019t have to repeat a block of code for every form field on a web page.<\/p>\n\n\n\n<p>Here\u2019s an example of a function in JavaScript:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>function printGoogle() {\n\tconsole.log(\"Google\");\n}<\/pre><\/div>\n\n\n\n<p>By itself, our function does not do anything, but when we call it, the function will print out <code>Google<\/code> to the console. To call our function, we use the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>printGoogle();<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-let\"><a href=\"https:\/\/careerkarma.com\/blog\/javascript-let\/\">JavaScript Let<\/a><\/h2>\n\n\n\n<p>The JavaScript <code>let<\/code> keyword is used to declare a block-scope, local variable that can be reassigned. Unlike <code>var<\/code> variables, <code>let<\/code> variables can only be accessed in a certain block of code, but they can be reassigned like <code>var<\/code> variables.<\/p>\n\n\n\n<p>Declaring a variable using <code>let<\/code> works in the same way as <code>var<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>let name = \"John Appleseed\";<\/pre><\/div>\n\n\n\n<p>Read our full article on JavaScript <code>let<\/code> to learn about the differences between <code>var<\/code>, <code>const<\/code>, and <code>let<\/code>, along with how to use them all correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-javascript-array-push\">JavaScript Array Push<\/h2>\n\n\n\n<p>When you\u2019re working with an array, you may want to add an item to that array. That\u2019s where the JavaScript <code>push()<\/code> method comes in. You can use <code>push()<\/code> to add an item to the end of an array. Here\u2019s an example of the <code>push()<\/code> method being used:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>var fruits = [\"Melon\", \"Apple\", \"Strawberry\", \"Banana\"];\nfruits.push(\"Avocado\");\nconsole.log(fruits);<\/pre><\/div>\n\n\n\n<p>Output:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>[\"Melon\", \"Apple\", \"Strawberry\", \"Banana\", \"Avocado\"]<\/pre><\/div>\n\n\n\n<p>You can also use <code>unshift()<\/code> to add an item to the start of an array. <code>unshift()<\/code> works in the same way as <code>push()<\/code>, and accepts the same argument.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>JavaScript is a programming language used to create dynamic web pages. In this guide, we have discussed a number of the most common JavaScript operations used by beginners. We\u2019ve covered everything from the <code>onClick<\/code> function to replacing strings, to slicing data based on your needs.<\/p>\n\n\n\n<p>This handbook isn\u2019t just for beginners, though. As you continue your journey learning JavaScript, you should keep coming back to this guide and use it to help you if you get lost. We\u2019ll keep this article updated so that if you have a question about a common JavaScript operation, you\u2019ll be likely to find it here.<\/p>\n","protected":false},"excerpt":{"rendered":"JavaScript is a programming language that\u2019s used to create dynamic content on websites. Take a moment to think about the web features you use every day. Think about how new content loads when you keep scrolling on Twitter, or how YouTube updates when you click on the like button. This is JavaScript at work. JavaScript&hellip;","protected":false},"author":240,"featured_media":12906,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-11973","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":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>A Handbook: JavaScript for Beginners | Career Karma<\/title>\n<meta name=\"description\" content=\"In this guide, we will discuss the basics of JavaScript and explore the most common functions used by beginners in the coding language.\" \/>\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-for-beginners-handbook\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript for Beginners: A Handbook\" \/>\n<meta property=\"og:description\" content=\"In this guide, we will discuss the basics of JavaScript and explore the most common functions used by beginners in the coding language.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/\" \/>\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-03-03T19:01:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T10:31:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/working-woman-person-technology-7375-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"714\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\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=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"JavaScript for Beginners: A Handbook\",\"datePublished\":\"2020-03-03T19:01:10+00:00\",\"dateModified\":\"2023-12-01T10:31:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/\"},\"wordCount\":1656,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/working-woman-person-technology-7375-1.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/\",\"name\":\"A Handbook: JavaScript for Beginners | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/working-woman-person-technology-7375-1.jpg\",\"datePublished\":\"2020-03-03T19:01:10+00:00\",\"dateModified\":\"2023-12-01T10:31:12+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"In this guide, we will discuss the basics of JavaScript and explore the most common functions used by beginners in the coding language.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/working-woman-person-technology-7375-1.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/working-woman-person-technology-7375-1.jpg\",\"width\":1000,\"height\":714},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-for-beginners-handbook\\\/#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 for Beginners: A Handbook\"}]},{\"@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\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A Handbook: JavaScript for Beginners | Career Karma","description":"In this guide, we will discuss the basics of JavaScript and explore the most common functions used by beginners in the coding language.","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-for-beginners-handbook\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript for Beginners: A Handbook","og_description":"In this guide, we will discuss the basics of JavaScript and explore the most common functions used by beginners in the coding language.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-03-03T19:01:10+00:00","article_modified_time":"2023-12-01T10:31:12+00:00","og_image":[{"width":1000,"height":714,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/working-woman-person-technology-7375-1.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"JavaScript for Beginners: A Handbook","datePublished":"2020-03-03T19:01:10+00:00","dateModified":"2023-12-01T10:31:12+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/"},"wordCount":1656,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/working-woman-person-technology-7375-1.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/","url":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/","name":"A Handbook: JavaScript for Beginners | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/working-woman-person-technology-7375-1.jpg","datePublished":"2020-03-03T19:01:10+00:00","dateModified":"2023-12-01T10:31:12+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"In this guide, we will discuss the basics of JavaScript and explore the most common functions used by beginners in the coding language.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/working-woman-person-technology-7375-1.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/working-woman-person-technology-7375-1.jpg","width":1000,"height":714},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-for-beginners-handbook\/#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 for Beginners: A Handbook"}]},{"@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\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/11973","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\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=11973"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/11973\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12906"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=11973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=11973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=11973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}