JSFiddle

  • Create Custom Methods in JS

    EasyProgramming.net tutorial on creating custom methods

    var phone = function(name, price, brand, model, os, colorF, colorB){
    		this.name = name,
        this.price = price,
    		this.brand = brand,
        this ...
  • Learn about the "this" keyword in JS

    EasyProgramming.net Tutorial on the "this" keyword

    var btn = document.getElementsByClassName("btn");
    
    for(var i = 0; i < btn.length; i++){
    	btn[i].addEventListener("click",function(){
      	console.log ...
  • Value Returning Functions

    EasyProgramming.net tutorial on Value Returning Functions

    var loan = 100;
    var interest = 0.05;
    
    console.log(total(loan,interest));
    console.log(total(200,0.03));
    console.log ...
  • JavaScript random Number Generator

    Learn how to create a quick Random Number generator in JavaScript in this EasyProgramming.net tutorial

    //Math.random() returns a value between 0 and 1
    //To get a number between 1 and 10, multiply the number ...
  • Limit Character Count in HTML Textarea

    EasyProgramming.net tutorial on how to count and limit characters in an HTML textarea

    var myText = document.getElementById("myText");
    var wordCount = document.getElementById("wordCount");
    
    myText.addEventListener("keyup",function(){
    	var characters = myText.value.split('');
      wordCount ...
  • Count Characters in Textarea

    Character count tutorial by EasyProgramming.lnet

    var myText = document.getElementById("myText");
    var wordCount = document.getElementById("wordCount");
    
    myText.addEventListener("keyup",function(){
    	var characters = myText.value.split('');
      wordCount ...
  • Intro to Event Listener

    EasyProgramming.net tutorial on Event Listeners!

    document.getElementById("name").addEventListener("click",function(){
    	alert("I have been clicked");
    });
    
    document.getElementById("name").addEventListener("click",function(){
    	var btnName = this ...
  • Intro to Custom JavaScript Functions

    Learn how to write your own functions in this tutorial provided by EasyProgramming.net

    var loan = 100;
    var interest = 0.05;
    
    //var addInterest = function(x,y){
    //	var calculated = x + (x * y);
    //  console.log(calculated ...
  • Value Returning Functions #35 is the latest revision

    EasyProgramming.net tutorial on value returning functions

    var loan = 100;
    var interest = 0.05;
    
    (function(x,y){
    	var calculated = x + (x * y);
    	document.getElementById("total").innerHTML = calculated ...
  • Looping with the Array.forEach method

    EasyProgramming.net tutorial on the array.forEach method

    //iterate through each array item with forEach
    
    var myArray = ['Boston','New York','Chicago','Miami','Los Angeles','Dallas','Seattle'];
    
    myArray.forEach ...