Created
December 28, 2018 08:12
-
-
Save 3014zhangshuo/82b81ad7d6427ec2605c2efaefa575a8 to your computer and use it in GitHub Desktop.
ruby code simulate javascript var keyword assign value
This file contains hidden or 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
def var(_);end | |
var name = "z" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just like a visual magic,
var name = "z"
you can split two parts, left partvar
is a method, right partname = "z"
as a argument of the var method, the argument will return "z" and set local variablesname
in current binding.