-
JavaScript Tutorial For Beginners #6 – Basic JavaScript Syntax & Rules
Hey guys, today’s awesome JavaScript lesson is gonna be all about the basics of JavaScript syntax and a few core rules. We’ll look at case sensitivity, what statements are, whitespace & layout, as well as comments and how the order of your code matters. As usual, comment below with any questions and I’ll do my…
-
JavaScript Tutorial For Beginners #34 – Changing Page Content
Yo ninjas! In this JavaScript tutorial, I’ll be showing you how to change your web page content on the fly via the DOM. To do this, we must follow two steps: 1. Reach into the page and grab a node / element 2. Change the property of that note (either innerHTML or textContent). In this…
-
JavaScript Tutorial For Beginners #4 – Where to put your JS
Hey all. In this JavaScript lesson I’ll show you exactly where to put your JavaScript code. The code can essentially be placed anywhere on your HTML document, but good practise dictates that you place it near the bottom of your code, and in an external file if it’s global or large. SUBSCRIBE TO CHANNEL –…
-
JavaScript Tutorial For Beginners #7 – JavaScript Variables
Hey ninjas. In today’s JavaScript tutorial, we’ll be taking a look at what variables are from a birds eye view. Variables are at the heart of most programming languages, and JavaScript is no different in that respect. Variables area a way of storing information (such as the pixel position of an element on a page,…
-
JavaScript Tutorial For Beginners #29 – THIS Keyword
Hey all, in this JavaScript tutorial for beginners, I want to introduce you to the THIS keyword, so… Ninjas, meet the THIS keyword. THIS, meet the ninjas :). Anyway, THIS in JavaScript is a very useful tool, and refers to whatever object currently owns the context you are working in. For example, at the root…
-
JavaScript Tutorial For Beginners #40 – The onClick Event
Hey ninjas / ninjarettes, in this JavaScript tutorial I want to run through a detailed example of how we can use the onclick event in JavaScript to create cool functionality on our websites. In this example I’ll use the onclick event to create a ‘show more’ style content box which expands and shrinks as you…
-
JavaScript Tutorial For Beginners 19 – Practical Example using Loops
Hey gang, in this JavaScript tutorial I just wanted to show you a quick practical example of using loops to change elements on a HTML page. In this example, we’ll create an array of all the anchor tags on our HTML document, cycle through them using a for loop, and then add a dynamic class…
-
JavaScript Tutorial For Beginners #30 – Constructor Functions
Hey ninjas, I think it’s about time we started using constructor functions to create our objects! So in this JavaScript tutorial for beginners I’ll introduce it to you! The constructor function is useful if you are creating many objects of the same ‘type’ – e.g. many different Car objects. It promotes DRY code (don’t repeat…