Javascript Events Tutorial Part 2 – Javascript Tutorials for Beginning Web Development

In the last video, I covered Javascript Events for new Javascript Web Developers. Let’s get a little more complex with those events by adding a loop and some different types of event listeners.

Here’s the source code:

And here’s all the key codes:

A web developer often needs to add an event to multiple elements, but you don’t want to repeat your code all over the place, so the best way to do it is to make a loop.

The good news is, since this loop just goes from i=0, i=1, i=2, etc, we can use one loop and add events to all 3 li’s & inputs with it.


Javascript Events Tutorial – How Web Developers Respond to User Input

Simple Javascript Events Tutorial with code! Almost every Web Developer finds themselves needing to respond to user actions on a page by changing content or adjusting the page display somehow. The way you do that is by listening to Javascript events.

– addition:
– pic link:

Popular Javascript Events Are:
– click
– mouseenter
– mouseleave
– mousedown
– mouseup
– mousemove
– keydown
– keyup
– blur
– focus

See list of all javascript events here:

In this lesson, we’ll add event listeners to html elements. When the users click, focus, blur, press a key, or move their mouse, javascript will get notified and we can make the webpage change.

Listening to Javascript events is a bread and butter task for web development and web developers.


Javascript Selectors – Javascript Tutorial for Beginners With Examples

In this Javascript tutorial for beginners, we’re going to be using Javascript selectors to access the DOM (document object model) and interact with our webpage in realtime. Selectors allow us to search for elements in the web page, get those html elements, and do things with them.

Selector methods are:

Once you have selected an html element, you can modify it:
document.getElementById(‘my-id’).innerHTML = “new html”
document.getElementById(‘my-id’).className = “newclass otherclass”

Hopefully you liked this javascript tutorial for beginners with examples (hopefully you like every web development tutorial I crank out)
As you can see, selectors are powerful in Javascript and even if you’re a javascript beginner, you can make any and every change to your web page.


Javascript Tutorial For Beginners – #4 Javascript Arrays & Loops

This Javascript tutorial covers Javascript arrays and looping arrays in Javascript. Arrays store lists of items of any type. You can iterate a Javascript array with loops, making it easy to run actions on all of the items in the array.

This is a Free Javascript Course designed for beginners. These Javascript lessons cover the basics of Javascript and programming basics from the very beginning.


Javascript Tutorial For Beginners – #3 Javascript Functions Tutorial

This Javascript tutorial covers functions in Javascript. Functions are a great way to store your code in reusable pieces of Javascript code that can be run at any time.

This is a Free Javascript Course designed for beginners. These Javascript lessons cover the basics of Javascript and programming basics from the very beginning.

In the first 2 lessons, we covered variables, several Javascript types, if else statements & comparison operators. Now, we’ll cover functions.

How I did livereload:
You can also use the editor – they have a great feature called “live preview”


JS Tutorial For Beginners – #2 If Else & Comparison Operators

In this free Javascript tutorial, we’ll cover if, else statements & comparison operators. This is a Free JS Course designed for beginners. These Javascript lessons cover the basics of Javascript and programming basics from the very beginning.

In the last lesson, we covered variables and several Javascript types. Before covering more types, we’ll cover comparison operators and if, else statements.

Comparison Operators Covered in this Video:
(youtube doesn’t allow me to do less-than and greater-than signs, which is really quite silly,
so I have to use LT and GT)
LT Less than
GT Greater than
LT= Less than or equal to
GT= Greater than or equal to
== equal to
!= not equal to

There are also “strict” equality types
=== same value and same type
!== not same value and same type

For example:
“2” == 2 will be true – even though they’re different types, they’re considered equal
“2” === 2 will be false because the second value is a number type, where the first is a string type
You should use the triple === whenever possible, as it’s more specific.


Javascript Tutorial For Beginners – Free JS Course – Web Development Tutorial

This Javascript Tutorial is a Free Javascript Web Development Course designed for beginners. If you’re wanting to know how to Javascript, in this course, you’ll get JS tutorials that cover the basics and programming basics from the very beginning.

We’ll cover Javascript variables, if else statements, functions, arrays, event bindings, and more. If you’re learning web development and are ready to learn Javascript for beginners, this is the free tutorial for you.