Created
September 3, 2019 13:48
-
-
Save codesbandit/7b610016b0dfbe60e8516f11ed546763 to your computer and use it in GitHub Desktop.
Basic JavaScript: Return a Value from a Function with Return
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
//https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return | |
function kali(args1,args2){ | |
var result = args1 * args2; | |
return result; | |
} | |
function tambah(args1, args2){ | |
var result = args1 + args2; | |
return result; | |
} | |
console.log(tambah(12,12)); | |
console.log(kali(12,12)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment