What is this if syntax?

I`m following a tutorial and in it they use several times and if syntax that looks like

condition && console.log("something")

I understand what it do, the && acts like the ? in this sintax:

condition ? dothis : dothisotherThing

But I don`t know from where that syntax come, anyone knows in which documentation can I read more about it?

Logical AND operator, specifically this use is called short-circuiting

Ternary operator

thanks! I didn`t know that logical operators can made those things, but knowing the name I google it and its much clearer

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.