Created
May 30, 2018 22:17
-
-
Save johadi/e23e26b2ed809cf4dd4922db7f4bd484 to your computer and use it in GitHub Desktop.
Calculate some arithmetic
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
class Double { | |
public double getDouble(value) { | |
return 2*value; | |
} | |
public static voind main(args[] string) { | |
System.out.println(getDouble(8)); // returns 16 | |
} | |
} |
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
function square(val) { | |
const result = val*val; | |
return result; | |
} | |
console.log(square(5)); // returns 25 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment