Created
September 12, 2017 15:16
-
-
Save jorovipe97/5ac21e34ae4ff845e1240ce57a35e7e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a1=2; | |
var a2=4; | |
function sum(a, b) { | |
var res=0; | |
var sum = 0; | |
var i = 0; | |
while (i < b) { | |
sum = sum + a; | |
i++; | |
} | |
res = sum; | |
return res; | |
} | |
console.log(sum(a1, a2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment