undefined
. Se você fizer uma operação matemática em uma variável undefined
, seu resultado será NaN
que significa "Não é um número" . Se você concatenar uma string com uma variável undefined
, você receberá uma string literal de "undefined"
. a
, b
e c
com 5
, 10
e "I am a"
respectivamente, para que elas não sejam undefined
. a
deve ser definido e avaliado para ter o valor de 6
testString: 'assert(typeof a === "number" && a === 6, "a
should be defined and evaluated to have the value of 6
");'
- text: b
deve ser definido e avaliado para ter o valor de 15
testString: 'assert(typeof b === "number" && b === 15, "b
should be defined and evaluated to have the value of 15
");'
- text: c
não deve conter undefined
e deve ter um valor de "I am a String!"
testString: 'assert(!/undefined/.test(c) && c === "I am a String!", "c
should not contain undefined
and should have a value of "I am a String!"");'
- text: Não altere o código abaixo da linha
testString: 'assert(/a = a \+ 1;/.test(code) && /b = b \+ 5;/.test(code) && /c = c \+ " String!";/.test(code), "Do not change code below the line");'
```