From 0fb4eff735925fbc2966c3d47cfc9e7614bde137 Mon Sep 17 00:00:00 2001 From: Tatiana Fokina Date: Mon, 8 Jul 2024 20:04:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D1=83=D0=B5=D1=82=20JS=20=D0=B2=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipes/slider/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/slider/index.md b/recipes/slider/index.md index c33e1e0a16..4add7fc331 100644 --- a/recipes/slider/index.md +++ b/recipes/slider/index.md @@ -648,10 +648,8 @@ const slider = document.querySelector('.slider') const slides = slider.querySelectorAll('.slide') let currentSlide = 0 -function updateSlider() { - slides.forEach((slide, index) => { - slide.hidden = index !== currentSlide - }) +slides.forEach((slide, index) => { + slide.hidden = index !== currentSlide }) ```