From 897765bb436867454de44d48868ae9ecd3f03735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9F=D0=B0=D1=80?= =?UTF-8?q?=D0=B5=D0=BD=D1=8E=D0=BA?= <48210690+nekitlnp@users.noreply.github.com> Date: Sun, 29 May 2022 19:15:56 +0300 Subject: [PATCH] Updated rainbow colors set Updated rainbow colors set and also removed useless else condition --- lib/maps/rainbow.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/maps/rainbow.js b/lib/maps/rainbow.js index 2b00ac0a..dadef177 100644 --- a/lib/maps/rainbow.js +++ b/lib/maps/rainbow.js @@ -1,12 +1,11 @@ module['exports'] = function(colors) { // RoY G BiV - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; + var rainbowColors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']; return function(letter, i, exploded) { if (letter === ' ') { return letter; - } else { - return colors[rainbowColors[i++ % rainbowColors.length]](letter); } + return colors[rainbowColors[i++ % rainbowColors.length]](letter); }; };