Javascript- object slice
1 min readAug 5, 2020
not an array slice
object slice
const foo = {
one: 'ONE',
two: 'TWO',
three: 'THRE',
four: 'FOUR',
}
const sliced = Object.fromEntries(
Object.entries(foo).slice(1, 3)
)
console.log(sliced)
#ref