Skip to content

Instantly share code, notes, and snippets.

View TomSchillemans's full-sized avatar

Tom Schillemans TomSchillemans

  • Netherlands
  • 09:24 (UTC +02:00)
View GitHub Profile
@tomodutch
tomodutch / recursion.js
Last active August 29, 2015 14:25
A simple demonstration of recursion
function addOne(number, times, iterated) {
iterated = iterated || 0;
return iterated == times ? number : addOne(number + 1, times, iterated + 1);
}
addOne(1, 10);