[Solved] === won’t work even if the statement is true

Introduction

Solved is a term used to describe a problem that has been successfully addressed and resolved. It is not a statement of fact, but rather a declaration that a problem has been solved. While it may be true that a problem has been solved, simply stating “Solved” does not guarantee that the problem has been completely and permanently resolved. It is important to take the necessary steps to ensure that the problem has been fully addressed and that the solution is effective and lasting.

Solution

No, a code solution cannot be “solved” simply by stating that it is true. A code solution must be tested and verified to ensure that it is working correctly.


Your variable age gets a String from the prompt.
For it to work you need to convert it to an int with the operator +:

If the use of the + operator feels strange to you in this case, you can always use the function parseInt() instead. It will achieve the same result.

var age = +prompt("What is your age?");
//        ^ Converts your String to an int
if (age === 21) {
 console.log("Happy 21st Birthday!");
}

6

solved === won’t work even if the statement is true


No, it is not possible to generate an article with HTML tags simply by stating that something is true. HTML tags are used to structure and format webpages, and they require a certain level of coding knowledge to create. In order to generate an article with HTML tags, you would need to have a basic understanding of HTML and be able to write code to create the desired tags.