Last active
May 16, 2021 11:12
-
-
Save helabenkhalfallah/6de1de8c2201251aaafac192659af3e2 to your computer and use it in GitHub Desktop.
Run To Completion Function
This file contains hidden or 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
const doOperations = (x, y) => { | |
const operation1 = x + y; | |
console.log('operation1 : ', operation1); | |
const operation2 = operation1 - y; | |
console.log('operation2 : ', operation2); | |
const operation3 = (operation1 * operation2) + 2 * (x - y); | |
console.log('operation3 : ', operation3); | |
return operation3; | |
} | |
console.log('doOperations : ', doOperations(3, 2)); | |
/* | |
"operation1 : ", 5 | |
"operation2 : ", 3 | |
"operation3 : ", 17 | |
"doOperations : ", 17 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment