diff --git "a/JS Intro \342\200\223 Exercism/hello-world-solution.js" "b/JS Intro \342\200\223 Exercism/hello-world-solution.js" new file mode 100644 index 0000000..3aa9417 --- /dev/null +++ "b/JS Intro \342\200\223 Exercism/hello-world-solution.js" @@ -0,0 +1,3 @@ +export const hello = () => { + return "Hello, World!"; +}; diff --git "a/JS Intro \342\200\223 Exercism/resistor-color-solution.js" "b/JS Intro \342\200\223 Exercism/resistor-color-solution.js" new file mode 100644 index 0000000..e3320d9 --- /dev/null +++ "b/JS Intro \342\200\223 Exercism/resistor-color-solution.js" @@ -0,0 +1,9 @@ +export const colorCode = (color) => { + for (let i = 0; i < COLORS.length; i++) { + if (COLORS[i] === color) { + return i; + } + } +}; + +export const COLORS = ["black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "grey", "white"]; diff --git "a/JS Intro \342\200\223 Exercism/two-fer-solution.js" "b/JS Intro \342\200\223 Exercism/two-fer-solution.js" new file mode 100644 index 0000000..d280f38 --- /dev/null +++ "b/JS Intro \342\200\223 Exercism/two-fer-solution.js" @@ -0,0 +1,3 @@ +export const twoFer = (name = "you") => { + return `One for ${name}, one for me.`; +};