Asked • 06/19/19

Why does 2 && 3 results in 3 (javascript)?

When I type in browser's console: console.log(2 && 3) it results always with second number (in this case 3): 3 Can someone explain me why?

1 Expert Answer

By:

Irving Z. answered • 07/05/19

Fullstack Software Engineer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.