diff options
author | Andinus <andinus@nand.sh> | 2021-08-27 09:36:49 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-08-27 09:36:49 +0530 |
commit | 346da9a7e08af19141a791978b3650bb150eafb0 (patch) | |
tree | c680fc4c2d30a0f5b35a64acb06f5ed4678a148e /javascript/resistor-color/resistor-color.js | |
parent | 16f7aba7ef1b48d940bca66adb59d10527b885e8 (diff) | |
download | exercism-346da9a7e08af19141a791978b3650bb150eafb0.tar.gz |
JS: Solve resistor-color exercise
Diffstat (limited to 'javascript/resistor-color/resistor-color.js')
-rw-r--r-- | javascript/resistor-color/resistor-color.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/javascript/resistor-color/resistor-color.js b/javascript/resistor-color/resistor-color.js new file mode 100644 index 0000000..735ca5d --- /dev/null +++ b/javascript/resistor-color/resistor-color.js @@ -0,0 +1,6 @@ +export const colorCode = color => COLORS.indexOf(color); + +export const COLORS = [ + "black", "brown", "red", "orange", "yellow", "green", "blue", + "violet", "grey", "white", +]; |