Both of these alerts will go off!
enum ColorPattern {
Solid,
Splotchy,
Striped
}
if (ColorPattern.Solid == ColorPattern["Solid"]) {
alert("equals");
}
if (ColorPattern.Solid === ColorPattern["Solid"]) {
alert("strictly equals");
}
No comments:
Post a Comment