开发者

Is the following the valid ruby statement/expression

开发者 https://www.devze.com 2023-04-12 07:08 出处:网络
saw the following in some .rb file name \"somet开发者_如何学JAVAhing\" why not using assignment like name = \"something\"name = \"something\"

saw the following in some .rb file

 name "somet开发者_如何学JAVAhing"

why not using assignment like name = "something"


name = "something"

assigns something to a variable called name.

name "something"

calls the method name passing something as parameter.

They are two different statements.

0

精彩评论

暂无评论...
验证码 换一张
取 消