Update errata.md
This commit is contained in:
parent
ebab9a9644
commit
71167a0810
@ -9,16 +9,16 @@ The example of an `if` statement here explains how a single `=` sign is always t
|
||||
Incorrect code is:
|
||||
```
|
||||
if(hobby == "coding"){
|
||||
console.log("** I love coding too! **");
|
||||
console.log("** I love coding too! **");
|
||||
} else {
|
||||
console.log("** Can you teach me that? **");
|
||||
console.log("** Can you teach me that? **");
|
||||
}
|
||||
```
|
||||
Correct code is:
|
||||
```
|
||||
if(hobby = "coding"){
|
||||
console.log("** I love coding too! **");
|
||||
console.log("** I love coding too! **");
|
||||
} else {
|
||||
console.log("** Can you teach me that? **");
|
||||
console.log("** Can you teach me that? **");
|
||||
}
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user