Even Fibonachi

by Juan Alban Franco

HTML

<html>
<body>
<p id=output></p>
<br>
<p id = sum ></p>

</body>
</html>

JavaScript

var sum = 2;
fibonachi(1,2);

function fibonachi(first_value,second_value){
  if (first_value + second_value < 4000000){    
      if ( (first_value + second_value) % 2 == 0){
      	sum += (first_value + second_value);
      }     
      fibonachi(second_value,(first_value + second_value));
  }

}

alert(sum);