Exercism Typescript Exercise : Resistor Color Trio
담담이담
내 풀이 enum COLORS { black = 0, brown = 1, red = 2, orange = 3, yellow = 4, green = 5, blue = 6, violet = 7, grey = 8, white = 9, } const units = { 0: "ohms", // 0개 3: "kiloohms", // 3개 6: "megaohms", // 6게 9: "gigaohms", // 9개 }; type color = keyof typeof COLORS; export function decodedResistorValue([first, second, third]: [ color, color, color ]) { let mainValue = +`${COLORS[first]}${COLORS[seco..