Skip to content

Instantly share code, notes, and snippets.

@dora-gt
Created October 13, 2011 17:10
Show Gist options
  • Save dora-gt/1284827 to your computer and use it in GitHub Desktop.
Save dora-gt/1284827 to your computer and use it in GitHub Desktop.
samples of String interpolation with ${expression}
main () {
var age = 21;
var name = {"first":"taro","last":"yamada"};
print ("Happy birthday, ${name['first'].toUpperCase()}, you're ${age++} today.");
}
main () {
var age = 21;
var name = {"first":"taro","last":"yamada"};
print ("Happy birthday, ${getFirstName(var name){return name['first'];}(name)}, you're ${age++} today.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment