JSFiddle

  • 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 ...
  • Do While Loop in JavaScript

    EasyProgramming.net tutorial on the do while loop

    //set the value of 'i' to 0; execute code once and then check the condition, continue if met
    
    var i ...
  • The 'while' loop

    Learn about the 'while' loop in the 24th Easy JavaScript tutorial, part of EasyProgramming.net

    //set the value of 'i' to 0; loop while 'i' is less than 10; increment 'i' by 1 every time ...