These are chat archives for airbnb/javascript

10th
Aug 2018
Brendon
@brendonco
Aug 10 09:05
anyone know about micro frontend?
Pratyush
@pratyushcrd
Aug 10 12:02
@yoavmmn Making an object would be most elegant if you are only doing === checks.
Ex.
const type = 'X' // or 'Y' or anything else

const defaultValue = 1000
const map = {
    X: 5000,
    Y: 400
}

const distance = map[type] || defaultValue