DEV Community

Mark Matthew Vergara
Mark Matthew Vergara

Posted on • Updated on

Javascript Tagalog - Equality & Strict Equality

Ano ngaba ang Equality and Strict Equality operator sa Javascript?
Basically yung equality operator i kukumpara niya lang yung dalawang values tapos mag rereturn siya ng true or false (boolean types). "Strict Equality" basahin niyo nalang sa baba

Syntax

Equality : value1 == value2
Strict Equality : value1 === value2

Examples

Javascript Tagalog Pinoy Strict Equality Equality


Normal vs Strict Equality
Sa Normal Equality sign i a-attempt niya i convert and compare mga values na different ang type, in this case String Type yung "1" but equal padin siya sa Number Type na 1
Javascript Tagalog Pinoy Strict Equality Equality
Pero sa Strict Equality hindi gagana yan, kase nga strict tulad ng parents niya.


yung mga Falsy values equals sila false
Javascript Tagalog Pinoy Strict Equality Equality
Pero sa Strict Equality False yarrn

Javascript Tagalog Pinoy Strict Equality Equality


maraming pang iba't-ibang values ang iba behavior sa equality operator, kunwari sa mga Objects,Arrays magkamukha sila pero false parin ang result kasi reference types sila.

Javascript Tagalog Pinoy Strict Equality Equality

I know medyo weird pero if magegets niyo on how javascript works under the hood, this totally makes sense. When you encounter mga problems sa mga equalities saglit lang silang i google in my opinion.


More tagalog Javascript Learning Resources:
https://javascript-methods-in-tagalog.vercel.app/

Oldest comments (0)

Visualizing Promises and Async/Await 🀯

async await

☝️ Check out this all-time classic DEV post