Last active
June 27, 2019 01:21
-
-
Save bluejava/f7617611296db6a0e07e7b6adedf3139 to your computer and use it in GitHub Desktop.
Example 2 for Medium Post
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 getScore() { return 45 } | |
function double(x) { return x * 2 } | |
Zousan.evaluate( | |
{ name: "username", value: "glenn" }, | |
{ name: "score", value: getScore }, | |
{ name: "newScore", value: double, deps: [ "score" ] } | |
).then(function(ob) { | |
console.log("Hello " + ob.username + ". Your new score is " + ob.newScore) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment