Continously run the style property everytime the condition is met | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Continously run the style property everytime the condition is met

I want the overlay(that red div) to always appear when the rounds are three. It happens the first time but after that even when the condition is met it doesn't happen. and also when the rounds are three i want it to start again(reset). Could someone help with this? Any advice on how to make my code more optimised will be appreciated https://codesandbox.io/s/objective-ptolemy-fdv9o?file=/src/index.js

10th Mar 2021, 6:24 AM
Dee
1 Answer
0
I couldn't find your bug but there were a few formatting errors and unless you are confident and comfortable with codesandbox, you should find another online editor because I've had similar problems in the past where this particular editor formats in places I don't want it to.
11th Mar 2021, 6:23 AM
EthanE230
EthanE230 - avatar