Chapter 4/7 : Code Checking Bug?


#1

In chapter 4 of this lesson, the syntax checker allows any value to be placed inside the square brackets after myName in the if statement:

    if (text[i] === myName[0]) {

    }

I tried 0, 1, and 2, and all yielded the "Great Work" green bar. Only the value 0 should be acceptable.


#2

The truth is that the lesson checker (SCT) does not check that line. It accepts both,

myName[0]

and

"E"

or any letter, for that matter. In order to write a rule for testing this line, myName[0] will have to be enforced. Only a fraction of learners caught onto this in Exercise 4, even while it is well enough explained, and it appears in Lesson 1 example.