Message from JavaScript discussions

November 2017

— 

for (const key in data) {
const value = data[key];
if (
typeof value === 'object' &&
typeof value.attrs !== 'undefined'
) {
// value is the object that holds attrs
}
}

Message permanent page

— 

Also the array i need is not always inside dict on dict, it can be on dict like
data = {attrs: [
{
time: "2017-10-18",
handsome: "9.5",
cool_kids: true
},
{
time: "2017-10-19",
handsome: "9.8",
cool_kids: true
}
]
}

— Or:

const value =
Object.values(data)
.find(value => value.attrs);

— Then just check for that first

— Its not always attrs 😕

— Well then you have a nondeterministic structure

— Whats that?

— Structure that not determined?

— Basically means it might as well be random

— Is there anyone familiar with npm and browserify ?
there is anyone can tell me how it work ?

— I feel like there is a missing switch syntax

— In JS and other langs it's a huge single block of statements seperated by break which grosses me out