You can enable the add function,
http://jsfiddle.net/seSMx/3/
function add() { return 1 + (three || 0); } var three = 3; document.getElementById('thediv').innerHTML = add();
Although, in my opinion, it will be very difficult. I would take it a step further and make the three
add
argument
function add(three) { return 1 + (three || 0); } document.getElementById('thediv').innerHTML = add(3);
source share