Skip to content

Instantly share code, notes, and snippets.

@davelnewton
davelnewton / refactor-nasty-ifs.js
Last active April 24, 2019 09:57
Code Cleanup on Aisle 5
const prices = {
"Residential": 90,
"Business": 150,
}
// TODO Handle no price found.
const price = numberOfRooms * prices[propertyUsage]
let discountMultiplier = 0
if (numberOfRooms >= 10) {