Edit in JSFiddle

var loan = 100;
var interest = 0.05;

	var calculated = x + (x * y);
	document.getElementById("total").innerHTML = calculated;
<!-- Easy JavaScript # 29 - Self-invoking Functions -->
Welcome to the 29th Easy JavaScript tutorial, part of <a href="http://www.easyprogramming.net">EasyProgramming.net</a>. We continue to look at JavaScript functions by working with self-invoking functions. 
Self-invoking functions are exactly what they sound like, functions that invoke themselves.  Unless you loop through them, they usually just run once per script. 


Syntax of a self-invoking function:</h2>

    //declare local variables
    //run this piece of code
    //invote it by using ();

Let's practice:</h2>
You borrowed $100 with an interest rate of 5%.<br />
The total owed with interest is: $<span id="total">___</span>
<br /><br />
<!-- You also borrowed $500.<br />
The total owed with interest is: <span id="2nd">___</span>
</p> -->