From 6acf6329e3553b8b53d337011478b18ebebc0470 Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:54:45 +0000 Subject: [PATCH] [Sync Iteration] typescript/resistor-color/1 --- .../typescript/resistor-color/1/resistor-color.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 solutions/typescript/resistor-color/1/resistor-color.ts diff --git a/solutions/typescript/resistor-color/1/resistor-color.ts b/solutions/typescript/resistor-color/1/resistor-color.ts new file mode 100644 index 0000000..d8fd28e --- /dev/null +++ b/solutions/typescript/resistor-color/1/resistor-color.ts @@ -0,0 +1,14 @@ +export const colorCode = (color: string): number => { + return COLORS.indexOf(color); +} + +export const COLORS = ["black", + "brown", + "red", + "orange", + "yellow", + "green", + "blue", + "violet", + "grey", + "white"]