当前位置:米豆网 params
+1°

The commonest javascript bug

2012年08月02日 | 作者: 米豆网 - 1000seo |

Every couple of weeks somebody will come running to me: “Swizec, Swizec, I did everything right, but this javascript isn’t doing what it’s supposed to! Whatever I click only the last item works. Halp!” Every time it’s the same bug – people just don’t understand how loops and closures play together in javascript. Invariably they loop through an array, attach the index to an event, then get frustrated when, upon ......
关键词:, ,
详细阅读