==
is called comparison/equality operator, it compares 2 values, but not their data types so for example
1 == '1'
will return true
, for stricter comparison, use ===
which will compare the data types too so 1 === '1'
will return false
More Related Contents:
- how do I use javascript to extract some data into a variable? [duplicate]
- How do I send a cross-domain POST request via JavaScript?
- Fetch error when building Next.js static website in production
- How to move cursor to end of contenteditable entity
- How to implement RouteReuseStrategy shouldDetach for specific routes in Angular 2
- What is “export default” in JavaScript?
- Best way to add page specific JavaScript in a Rails 3 app?
- How to perform a real time search and filter on a HTML table
- Why is it Object.defineProperty() rather than this.defineProperty() (for objects)?
- How to get all selected values from ?
- Set content of iframe
- How to print HTML content on click of a button, but not the page? [duplicate]
- React: why child component doesn’t update when prop changes
- Mixins for ES6 classes, transpiled with babel
- How To Show And Hide Input Fields Based On Radio Button Selection
- How can % signs be used in identifiers
- How can I perform a str_replace in JavaScript, replacing text in JavaScript?
- regular expression for [allchars]
- puppeteer: wait N seconds before continuing to the next line
- Is there any way of passing additional data via custom events?
- How do I send an HTTP request from a Chrome extension?
- Is event a global variable that is accessible everywhere inside the callback chain?
- In ES6, what happens to the arguments in the first call to an iterator’s `next` method?
- Does JavaScript support array/list comprehensions like Python?
- Subscribe to observable is returning undefined
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- Jquery: Filter dropdown list as you type [closed]
- Convert JavaScript variable value to csv file
- Reading PDF file using javascript
- Removing element with jQuery?