If you find any mistakes in the second edition of JavaScript from Beginner to Professional, or if you have suggestions for improvements, then please raise an issue in this repository, or email to us.
The example of an if statement here explains how a single = sign is true. It should be if(hobby = "coding")
Incorrect code is:
if(hobby == "coding"){
console.log("** I love coding too! **");
} else {
console.log("** Can you teach me that? **");
}
Correct code is:
if(hobby = "coding"){
console.log("** I love coding too! **");
} else {
console.log("** Can you teach me that? **");
}
Solution for Exercise 14.4 is now fixed.
while (notFound && someArray.length > 0) {
if (someArray[0] === "Louiza") {
console.log("Found her!");
notFound = false;
console.log("false");
} else {
someArray.shift();
}
}
Modify the calculator that you made in Practice exercise 6.2
should be
Modify the calculator that you made in Practice exercise 6.4