
Master JavaScript basics by exploring values, types, operators, and control structures like expressions, statements, and loops. Learn functions, objects, and arrays to build robust, scalable web applications.
Learn to set up brackets for JavaScript, place code between script tags in HTML, and write basic statements with semicolons that print Hello world.
Learn how to declare and assign variables in JavaScript using var, explore numeric, string, and boolean types, and use comments, case-sensitive naming rules, and the alert function.
Clarify the difference between loosely typed and strongly typed languages, showing how JavaScript omits explicit data types and why omitting var hurts readability and can cause issues.
Learn to use an external javascript file to organize web site code in a folder and link it with the source attribute in HTML. Reduce page clutter and enable reuse.
Learn how functions form the core blocks of JavaScript, how to define, name, and call them, pass data, and reuse code to build interactive web pages.
Explore how to define functions with opening and closing parentheses, use parameters and internal variables to add values and strings, input multiple arguments, and display results.
Explore JavaScript operators, starting with assignment and arithmetic operators, then compound and incremental operators, and understand operator precedence with practical examples using parentheses.
Explore how JavaScript loops work, focusing on while loops, conditionals, and avoiding infinite loops by updating a counter and testing conditions.
Learn how the for loop mirrors the while loop, with i as the counter, a condition, and an increment inside the for statement for concise, readable code.
Combine functions and if statements to create a batting function that tests hit distance against 350 feet, prints hits or home runs, and uses an and operator for positive distance.
Use the return statement to send data back from a function to its caller, enabling you to store results in a variable and display them with document.write after multiplying inputs.
Explore global and local variables in JavaScript scope. Global variables outside functions are accessible; local variables inside a function are restricted to that function and appear only there.
Learn how pass by value works in JavaScript: copies of arguments are passed to function parameters, leaving original values unchanged, before moving on to arrays.
Learn how arrays store multiple values in a single variable using square brackets, with zero-based indexing to access and update elements, and compare shorthand and longhand array creation.
Grasp how JavaScript objects wrap related variables into a single object using name-value pairs, access properties with the dot, and understand their difference from arrays.
Explore the string object in JavaScript, a global object that wraps string variables and provides methods like toUpperCase, charAt, replace, and the length property for text manipulation.
Explore the JavaScript math object and its methods: round, ceil, floor, and sqrt, via a 4.7 example and the square root of 16.
Explore the date object in JavaScript, learn to copy objects with new, format dates as strings, and use get and set methods to read or modify the year.
Explore the document object model, its two representations, and how JavaScript uses objects for each HTML tag to access and manipulate page elements.
Use the getElementById method to grab a paragraph by its id and modify its text color and background color via the style object, using camelCase properties.
Use getElementsByTagName to grab all paragraph tags, build a node list, and select by index to change text and font with the style object, enabling mass updates via loops.
Use the get elements by tag name method to select all paragraph tags, then loop through the node list to update each paragraph to telex.
Explore how events drive interactive web pages by binding an on click event to a button, triggering a function that changes paragraph color and demonstrates element binding.
Explore how the mouseover and mouseout events work in JavaScript, changing and restoring an element's background color when a user hovers over and then leaves it.
Learn how to swap images on hover using the on mouse over and on mouse out events, by swapping the src of an image via getElementById to display two images.
Learn to create a heading element before a paragraph by building and appending an h2 to a div, attach its text node, and reuse prior code.
Learn to remove elements from the DOM with a click, using getElementsByTagName, parent nodes, and removeChild to delete headings and paragraphs in a dynamic section.
Place your script tag before the closing body tag to allow the page to render fully before JavaScript runs, ensuring the document is created and stylesheets load first.
Join a follow up session to episode 31 to debug a JavaScript interaction that hides two paragraphs and a button, then fix by assigning an id and hiding the button.
JavaScript is a programming language used to make web pages interactive and it's the most popular programming language in the world!.
It runs on your visitor's computer and doesn't require constant downloads from your website. JavaScript is often used to create polls, validation and quizzes.
Essentially JavaScript is designed to add interactivity to your website.
What you will learn in this course?:
In this tutorial we'll learn JavaScript from from scratch together and will implement and explain a number of real-life code examples which you'll be able to re-use in your own JavaScript projects.