Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
只是一个简单的。
例如:
var myValue = 0; function (){ var initialNumber = 4; var numberToAdd = 2; var finalNumber = numberToAdd+initialNumber; }
如何附加 finalNumber 并存储在 myValue 变量中?
var myValue = myFunction (2); function myFunction (numberToAdd){ var initialNumber = 4; return numberToAdd+initialNumber; }