Message from JavaScript discussions

December 2018

— Completely Fair Scheduler (CFS) from Linux

— 

When i check if a object has a property i mostly do it like this:
let myObj = {
}

if(!!Object.keys(myObj)[0])

— Wat

— Kek

— Why is this so much better ?
Object.prototype.hasOwnProperty.call(object, key)

— Are you checking if the object has a property named X, or checking if the object has more than 0 properties?

Message permanent page

— If it has a property named x

— I do:
if (object.key) {

— I don't have falsy properties anyway 😎

— Im reading trough airbnbs code style book, and they wrote that what i pasted

— Yeah, because that's the correct way

— Which is so good.. their explanation is: