How to change the abbreviated js, to normal writing?

e.keyCode === 13 && !e.shiftKey && e.preventDefault();

see an abbreviated js

on the network.

but I can"t understand it all the time. I just know that it seems to be the abbreviation of if else

.

if you change him back to the normal way of writing, what should he look like?

Mar.07,2021

if (e.keyCode === 13 && !e.shiftKey) {
   e.preventDefault();
}

  

is not an abbreviation.
in fact, the writing on the first floor is more in line with the author's expectations.
aquarterb
return true
if all of a _ r _ b are true, but his calculation rule is
if an is true, it will determine whether b is true
if an is true, return false directly instead of judging whether b is true
this is a short circuit

Menu