每个方法有一个名字、若干参数和一个返回值。
Each method has a name, a number of parameters, and a return value.
如果你在没有手机和指南针的情况下迷路,并且确实找不到哪里是北方了,有一些技巧可以帮助你找到返回人类社会的路,其中一个是沿着陆地走。
If you get lost without a phone or a compass, and you literally can't find north, a few tricks may help you navigate back to civilization, one of which is to follow the land.
该组件接收一个具有 ID 和名称的数据对象,然后返回另一个包含信用分数和信用额度的数据对象。
The component will take in a data object with an ID and name, and then return another data object containing a credit score and credit limit.
Again I should have said first, index 0, the first one. I can similarly go in and say I'd like all the things between index 2 and index 4. And again, remember what a b c that does. Index 2 says start a 0. 1, 2. So a, b, c.
我还是要说一遍,索引为0的元素,是第一个元素,我可以要求返回索引,2和4之前的所有元素,请记住2,是从0开始的,那么0,1,2对应的是。
And actually, if I don't want to clobber, as we say, overwrite the value of my variable, ; I could declare another one and store the return value in Y; Y so now I have two ints in memory; X and Y, 3 one with two, one with three.
实际上,如果你不想彻底清除,像我们说的,覆盖那个变量的值,我可以申明另一个变量Y,并在Y中保存那个返回值;,现在内存中有两个int数,X和,一个的值为2,一个为。
So I don't know don't, John, I would argue if I'd written this better, I would have had a method that returned the x- and the y- value, and it would be cleaner to go after it that way.
我会去辩论这么写是不是更好,我也可以写一个,返回x坐标和y坐标的方法,这么做可能会更清楚一点,这是很棒的缩写,好。
应用推荐