Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
5
  • Prefer an array literal [] to new Array() Commented May 19, 2014 at 8:08
  • Where did you put the second for loop? Outside the $(document).ready? Commented May 19, 2014 at 8:10
  • 1
    for (i = 1; i < 10; i++) { why start from 1 ? Commented May 19, 2014 at 8:11
  • Where are you invoking this loop? If it is outside the ready function, then you simply don't have cells in scope. Other than that, see Array.length and Array.forEach Commented May 19, 2014 at 8:12
  • @Sacho — The original question had some of the text as a JS comment which wasn't properly indented. Someone edited it to remove the comment markers instead of indenting it. I've just changed that, it seems to make things clearer. Commented May 19, 2014 at 8:15

lang-js

AltStyle によって変換されたページ (->オリジナル) /