有一些愚蠢的语法,像花括号和分号,一开始是有点烦人的,因为你必须记住所有的这些要放到哪里。
There is some stupid syntax, like curly braces and semicolons, that initially is kind of annoying because you have to remember where all this goes.
花括号表示对象,方括号表示数组。
Curly braces indicate an object, and brackets indicate an array.
花括号压缩了一行或多行代码。
But if I did have two lines of code or more, I would in fact need to put those back.
但是如果我的确有两行或更多的代码,我其实应该把花括号加上。
You can put a variable there, and because it's not encapsulated in curly braces, as we just discussed, that essentially means it's accessible everywhere in that file.
你可以加入一个变量,因为它不是封装在花括号里,就像我们刚才讨论的,本质的意思是它可以在文件的所有地方,都可以被访问到。
And then what I get to do inside the curly braces is literally line by line enumerate the cases that I want to apply to the following code.
然后我们在花括号中要做的是,逐行地列举接下来我想要,应用的代码。
应用推荐