Ctx.query.name = ctx.query.name & & ctx.query.name.toUpperCase ()

the purpose of this writing seen in the egg document is to capitalize the name parameters requested by the user.
what does the & & on this side mean?


var a=1,b=2,c=3;
a = b&&c  //a=c
a = c&&b  //a=b
Jul.03,2021

A && B

if An is true, then judge whether B is true or not.

have and operate, of course have or operate

A || B

if An is false, then judge whether B is true
clipboard.png

.
Menu