Created
February 28, 2015 14:10
-
-
Save Shinpeim/d87c6d39b2067c0606a5 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
function returnDouble(x){ | |
var result = x * 2; //引数を2倍にして | |
return result; // それを返すという関数 | |
} | |
var n = 10; | |
var m = returnDouble(n); //returnDoubleをnを引数にして呼び出して、returnされた値を m に代入 | |
console.log(n); // 10 | |
console.log(m); // 20 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment