0

Problem with Javascript

What wrong with this : const 2 = false GetElementById(2) (2) (In a begginer)

24th Nov 2024, 7:59 PM
Hi"-"
Hi"-" - avatar
4 Antworten
+ 5
I would suggest you to start with introduction to javascript course available in the courses list.
25th Nov 2024, 1:25 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 3
here is the correct syntax:- const isFalse = false; document.getElementById("2"); their were few error in your code i) variable name cannot start with a numerical value ii) Js is a case-sensitive language. getElementById not GetElementById. iii) getElementByld Id must be string
25th Nov 2024, 10:52 AM
Alhaaz
Alhaaz - avatar
+ 2
variable and constant names must not start with a number. it is unclear which element you try to get. if you need help with your code, link your code.
24th Nov 2024, 8:24 PM
Lisa
Lisa - avatar
0
Thanks you <3
25th Nov 2024, 7:49 PM
Hi"-"
Hi"-" - avatar