fix(curriculum): updated JS debugging challenge run-test (#47139)

pull/47145/head
Abhishek Sharma 2022-08-03 21:59:04 +05:30 committed by GitHub
parent 853be8d712
commit 9a9cef38bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ assert(!code.match(/i\s?=\s*?1\s*?;/g));
Your code should set the terminal condition of the loop so it stops at the last index. Your code should set the terminal condition of the loop so it stops at the last index.
```js ```js
assert(code.match(/i\s*?<\s*?len\s*?;/g).length == 1); assert(code.match(/i\s*<\s*len\s*;|i\s*<=\s*len\s*-\s*1\s*;/g).length == 1);
``` ```
Your code should fix the terminal condition of the loop so that it stops at 1 before the length. Your code should fix the terminal condition of the loop so that it stops at 1 before the length.