Ask coding questions

← Back to all posts
help me Fix this problem please
VampireOfficals

I'm having this problem my <script> line is not functioning

<script> Let stars = document.getElementById('stars'); Let moon = document.getElementById('moon'); Let mountains_behind = document.getElementById('mountains_behind'); Let text = document.getElementById('text'); Let btn = document.getElementById('btn'); Let mountains_front = document.getElementById('mountains_front'); window.addEventListener('scroll', function(){ let value = window.scrolly stars.style.left = value * 0.25 + 'px'; moon.style.top = value * 1.05 + 'px'; mountains_behind.style.top = value * 0.05 + 'px'; mountains_front.style.top = value * 0 + 'px'; text.style.marginRight = value * 0 + 'px'; }) </script>

--------------------------------------------------------------Please help me

video of website making - https://youtu.be/1wfeqDyMUx4

Voters
VampireOfficals
Comments
hotnewtop
JustCoding123

Let should be let.

lynwod

i think you should move the code in script to the script file