I have a very silly question to understand, Can you please help me with this
I want to do the check as below in javascript, which is better and can you please explain to me why
I am just checking whether my string path contains the value /
at the last or not
if (!(path.slice(-1) == '/')) {...}
OR
if (path.slice(-1) != '/'){...}
I have gone through all these questions and I didn't get the correct answer (I am okay to get downvotes but please answer me :))
Which is better way? Variables related