Because the for-each loop works in the context of the //feed/entry node, the relative paths for title and summary are used.
由于 for-each 循环在 //feed/entry 节点的上下文中工作,所以为标题和总结使用了相对 路径。
The previously declared rss-summary function uses a for loop to iterate over each item by using the XPath specification to select each item.
通过使用 XPath 规范,前面声明的 rss-summary 函数使用了一个 for 循环在每个项上进行迭代,以便选择每个项。
Temps often are used to store summary information in loops. The entire loop can be extracted into a method; this removes several lines of noisy code.
临时变量常常会被用来在循环中存储加总的信息,可以将整个循环提取到新方法中,这样要移动几行夹杂在其中的代码。
应用推荐