From 007cabe984d6baf5c212508a70489d7409319c46 Mon Sep 17 00:00:00 2001 From: lolabird Date: Fri, 10 Nov 2023 01:31:07 -0700 Subject: [PATCH] change rgbColor output to string literal --- script.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script.js b/script.js index 2449cbb..0d581bb 100644 --- a/script.js +++ b/script.js @@ -82,9 +82,8 @@ function rgbColor() { let g = Math.floor(Math.random() * 255); let b = Math.floor(Math.random() * 255); - let rgbCol = "rgb(" + r + "," + g+ "," + b +")"; + return `rgb(${r},${g},${b})`; - return rgbCol; } createGrid(); \ No newline at end of file