Forem

Cover image for Operadores Relacionais: Exemplos (Parte 2)
ananopaisdojavascript
ananopaisdojavascript

Posted on • Originally published at ananopaisdojavascript.hashnode.dev

2

Operadores Relacionais: Exemplos (Parte 2)

Vou criar duas variáveis com valores definidos:

const A = 5;
Enter fullscreen mode Exit fullscreen mode
const B = 3;
Enter fullscreen mode Exit fullscreen mode

Vou criar algumas relações entre eles:

A === B; // false
Enter fullscreen mode Exit fullscreen mode

A não é igual a B, portanto o resultado é false.

A !== B; // true
Enter fullscreen mode Exit fullscreen mode

A não é igual a B, portanto o resultado é true.

A > B; // true
Enter fullscreen mode Exit fullscreen mode

A é maior do que B, portanto o resultado é true.

A < B; // false
Enter fullscreen mode Exit fullscreen mode

A não é menor do que B, portanto o resultado é false.

A >= B; // true
Enter fullscreen mode Exit fullscreen mode

A não é igual a B, porém é maior do que B, portanto o resultado é true.

A <= B; // false
Enter fullscreen mode Exit fullscreen mode

A não é igual nem menor do que B, portanto o resultado é false.

E aí? Gostaram? Até a próxima anotação! 😊

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay