这与浏览器合并字符串时分配内存的方法有关。
This is because of the way that browsers allocate memory when merging strings.
当合并字符串的长度和数量增加之后,有些函数开始显示出自己的威力。
As the length and number of strings that must be merged increases, however, some methods start to show their strength.
那么你怎样优化此类任务呢?首先,有多种方法可以合并字符串(见表5 - 1)。
So how can you optimize these kinds of tasks? For starters, there is more than one way to merge strings (see Table 5-1).
In which I said, you know, I didn't like the fact that things like plus are overloaded, because you can use plus to add strings, you can use plus to add numbers, you can use plus to add floats.
那个玩笑是这样的,你们懂得,我并不喜欢,加法被重载这样的事情,但是你可以用加法,来对字符串进行合并,你可以用加法来加数字。
It is going to merge them together into one thing.
这样会把两个字符串合并到一个东西里面去。
应用推荐