The comparison operator "<" has a higher precedence than the equality operator "===", which means that "1<3" will be evaluated first, resulting in the boolean value true. Then the comparison "1===true" is evaluated, which will return false because they are not equal in type or value.
To check if 1 is equal to 1 less than 3, you can use parentheses to group the comparison "1<3" and then compare it to 1 using the equality operator as follows:
(1 === (1 < 3))
This will return true because (1<3) will be evaluated to true, and then the comparison "1===true" is not made.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-05-19 11:00:00 +0000
Seen: 13 times
Last updated: Aug 22 '22
When printing from WKWebView in Swift, the background is not taken into account.
Is it feasible to utilize a Toggle Button to switch among multiple classes exceeding 2?
What is the process for generating a dynamic subdomain/URL using vue.js?
How can I create a transition on click using CSS without the need for JavaScript?