Texas Governor Greg Abbott declares that Texas law supercedes Federal authority and hints at secessionreturn2ozma@lemmy.world to politics @lemmy.world – 769 points – 5 months agoboingboing.net312Post a CommentPreviewYou are viewing a single commentView all commentsShow the parent commentNormal languages: "does this equal that?" JS: "does this REALLY equal that, or just 'equal' that?"Beats having explicit null checks everywhere.As opposed to null and undefined?No one checks those values explicitly. if (str) checks if it's not null, undefined, or empty string. Optional chaining like if (arr?.length) checks if list is undefined, null, or empty array. Falsy and truthy comparators seem fucky in the beginning when coming from a strongly typed language. But they're very convenient when used properly.Monads exist, optional chaining has been around for ages, and implicit bool casts, too. As you said, no one checks those values explicitly.
Normal languages: "does this equal that?" JS: "does this REALLY equal that, or just 'equal' that?"Beats having explicit null checks everywhere.As opposed to null and undefined?No one checks those values explicitly. if (str) checks if it's not null, undefined, or empty string. Optional chaining like if (arr?.length) checks if list is undefined, null, or empty array. Falsy and truthy comparators seem fucky in the beginning when coming from a strongly typed language. But they're very convenient when used properly.Monads exist, optional chaining has been around for ages, and implicit bool casts, too. As you said, no one checks those values explicitly.
Beats having explicit null checks everywhere.As opposed to null and undefined?No one checks those values explicitly. if (str) checks if it's not null, undefined, or empty string. Optional chaining like if (arr?.length) checks if list is undefined, null, or empty array. Falsy and truthy comparators seem fucky in the beginning when coming from a strongly typed language. But they're very convenient when used properly.Monads exist, optional chaining has been around for ages, and implicit bool casts, too. As you said, no one checks those values explicitly.
As opposed to null and undefined?No one checks those values explicitly. if (str) checks if it's not null, undefined, or empty string. Optional chaining like if (arr?.length) checks if list is undefined, null, or empty array. Falsy and truthy comparators seem fucky in the beginning when coming from a strongly typed language. But they're very convenient when used properly.Monads exist, optional chaining has been around for ages, and implicit bool casts, too. As you said, no one checks those values explicitly.
No one checks those values explicitly. if (str) checks if it's not null, undefined, or empty string. Optional chaining like if (arr?.length) checks if list is undefined, null, or empty array. Falsy and truthy comparators seem fucky in the beginning when coming from a strongly typed language. But they're very convenient when used properly.Monads exist, optional chaining has been around for ages, and implicit bool casts, too. As you said, no one checks those values explicitly.
Monads exist, optional chaining has been around for ages, and implicit bool casts, too. As you said, no one checks those values explicitly.
Normal languages: "does this equal that?"
JS: "does this REALLY equal that, or just 'equal' that?"
Beats having explicit null checks everywhere.
As opposed to null and undefined?
No one checks those values explicitly.
if (str)
checks if it's not null, undefined, or empty string.Optional chaining like
if (arr?.length)
checks if list is undefined, null, or empty array.Falsy and truthy comparators seem fucky in the beginning when coming from a strongly typed language. But they're very convenient when used properly.
Monads exist, optional chaining has been around for ages, and implicit bool casts, too.
As you said, no one checks those values explicitly.