Help me please | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Help me please

I was doing an animation but it doesn't define .offsetHeight and .getBoundingClientRect for some reason. Here's the code: https://www.sololearn.com/compiler-playground/WLnc1kRf3dt0 p.s. i do it on my computer and i didn't changed the image and fonts when copied it here so don't pay attention to it

3rd Nov 2022, 9:34 PM
Sandy
Sandy - avatar
3 Answers
+ 1
There is a conflict between lines 15 and 16. Since you are using for/of at line 15, variable i will be an HTML element object but line 16 is expecting variable i to be an index(for/in). I suggest changing variable i to animItem and deleting line 16.
3rd Nov 2022, 10:22 PM
ODLNT
ODLNT - avatar
0
the code is not public....
3rd Nov 2022, 10:26 PM
KrOW
KrOW - avatar
0
The sad truth of the matter is that for some reason, sololearn website decided to add an extra layer/ path (compiler-playground) making it so that only members who view via the website can access the link. https://code.sololearn.com/WLnc1kRf3dt0
3rd Nov 2022, 10:38 PM
ODLNT
ODLNT - avatar