JPDev ( JPDev@programming.dev ) to Programmer Humor@programming.dev · 3 years ago===programming.devimagemessage-square34linkfedilinkarrow-up1380
arrow-up1380image===programming.devJPDev ( JPDev@programming.dev ) to Programmer Humor@programming.dev · 3 years agomessage-square34linkfedilink
minus-squareclb92 ( clb92@feddit.dk ) linkfedilinkEnglisharrow-up3·3 years agoLike == but more strict. The == operator will do type conversion, so 0 == '' will actually be true, as an example. Sometimes (honestly, most times) you may want to compare more strictly. See this StackOverflow answer: https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons
Like
==but more strict. The==operator will do type conversion, so0 == ''will actually be true, as an example. Sometimes (honestly, most times) you may want to compare more strictly.See this StackOverflow answer: https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons