From 7b96076f454caa22dc394864d312680838dbc2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B5=D0=B9=D0=BA=D0=B8=D0=BD=20=D0=98?= =?UTF-8?q?=D0=BB=D1=8C=D1=8F=20=D0=92=D1=8F=D1=87=D0=B5=D1=81=D0=BB=D0=B0?= =?UTF-8?q?=D0=B2=D0=BE=D0=B2=D0=B8=D1=87?= Date: Wed, 25 Sep 2024 09:08:53 +0300 Subject: [PATCH] =?UTF-8?q?=D1=87=D1=82=D0=BE=20=D1=81=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1-module/4-task/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/1-module/4-task/index.js b/1-module/4-task/index.js index 08684b7..13c691b 100644 --- a/1-module/4-task/index.js +++ b/1-module/4-task/index.js @@ -1,3 +1,10 @@ function checkSpam(str) { - // ваш код... + if (str.length === 0) return str; + + let trueStr = str.toLowerCase(); + if (trueStr.includes('1xbet') || trueStr.includes('xxx')) { + return true; + } else { + return false; + } }