Remove undefined
article thumbnail

CodeSOD: Undefined Variable

The Daily WTF

if ( typeof loadingText "undefined" ) { var loadingText = window.Resources.Messages.Loading; } … }. Which highlights why this code is pointless: of course loadingText is undefined , we literally define it on the next line. var declared variables automatically get "hoisted"- they're always scoped to the function.

MVC 56
article thumbnail

Error'd: Destination Undefined

The Daily WTF

"I mean, the fact that you can't ship to undefined isn't wrong, but it's not right either," Kevin K. David wrote, "Sure am glad that they have a men's version of this.I have so many things to do with my kitchen hands." " . "I " . "As

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Swift language achieves data-race safety

InfoWorld

In explaining the milestone, Apple Swift engineer Holly Borla said an increasingly important source of undefined behavior is concurrent code that inadvertently accesses memory from one thread at the same time that another thread is writing to the same memory.

Data 87
article thumbnail

Swift achieves data-race safety

InfoWorld

In explaining the milestone, Apple Swift engineer Holly Borla said an increasingly important source of undefined behavior is concurrent code that inadvertently accesses memory from one thread at the same time that another thread is writing to the same memory.

Data 79
article thumbnail

SAP’s new generative AI pricing: Neither transparent nor explainable yet

CIO

Given the specific examples they’ve noted (invoice matching), there is absolutely a risk that SAP will create as-of-yet undefined costs to leverage their AI solutions which integrate with non-SAP products.

article thumbnail

Logical Assignment Operators

David Walsh

Question-Question-Equals assigns value when the value is undefined: const j = 1; j??= 10 // j >> 1 x = undefined; x ??= 10 // x >> 10. &&=. &&=.

article thumbnail

CodeSOD: Because of the Implication

The Daily WTF

undefined || v.bis !== undefined) { return (v.von !== null && v.von !== 'undefined' && v.von !== '') || (v.bis !== null && v.bis !== 'undefined' && v.bis !== ''); } return (v !== 'undefined' && v !== ''); }).forEach(key