Follow

Why does this work in JavaScript?

{...true}

How can you spread a boolean that isn't an iterator???

@belljar it does, but I just don’t get how you can spread a Boolean, it just seems wrong

@hugo you can do it in an array spread! it does seem odd to do in an object spread though

@hugo actually don't mind me, i'm thinking of [...someArray, true]

Sign in to participate in the conversation
Melbourne Mastodon

Melbourne Social is a small Mastodon instance for users from/interested in/living in Melbourne, Australia 📍