When applying the rule would make the code less readable.
当使用该规则会让代码变得难以理解。
Code less easy to use, based on mechanics. suitable for beginners.
简单好用代码量少,基于力学的。适合于初学者。
The two ways of registering event handlers are completely the same, the only difference is that the second one clutters your code less.
这两种事件注册的方式其实完全一样的,只是第二种方式会使代码看起来凌乱一点。
OK? And in fact, if you look at the code up here, and it's on your handout, the very first one, x 1, right here- if I could ask you to look at it-- is a piece of code to do it. And I'm less interested in the code than how we're going to analyze it, but let's look at it for a second.
实际上,如果你看看,你们课堂发的材料上面的代码,第一页上的,就是那-,大家请看看实现的这一部分代码,我不太关心,我们会怎么解释这个代码,首先让我们先看看。
00 Now I say while i is less than or equal to 100, I write my code, I sleep for a second.
现在我指明当i小于等于,我写下我的代码,我休眠一分钟。
So it feels a little backward mentally perhaps, 1 but this is saying, "do this block of code as long as n is less than 1."
所以它感觉可能有点迟缓,但是它指明,“只要n小于,执行这段代码“
应用推荐