Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strict equality (===) vs non strict (==) #28

Closed
bobbysebolao opened this issue Nov 8, 2019 · 0 comments
Closed

Strict equality (===) vs non strict (==) #28

bobbysebolao opened this issue Nov 8, 2019 · 0 comments
Assignees

Comments

@bobbysebolao
Copy link

It's a good idea to use strict equality comparison (with the === operator) unless there’s a good reason not to.

The big difference between non strict and strict is that non strict comparison checks that two values are the same, whereas strict comparison also checks that the type of data (e.g. string, integer, boolean) is the same

if (item.id == idToMark) (line 60, logic.js)

You could change this to strict comparison to make this if statement more robust :)

@marialani marialani self-assigned this Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants