Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function addThree(x)
{
return x + 3;
}
// Method one.
original = 4;
y = addThree(original); // 4 + 3 = 7
z = addThree(y); // 7 + 3 = 10
// Method two.
original = 4;
z = addThree(addThree(original)); // 4 + 3 + 3 = 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.