getElementsById() method is not allowing in sublime text

when i use the method getElementsById() method in sublime text and then moving to console page it shows that method is unavailable as i like i attached screenshot below
Screenshot 2022-04-19 134929

Hi there @kirthickrubhan123,
i believe the syntax of your code is correct,
its just that in the line below the starting script tag the correct syntax is,
document.getElementById(“output”).innerHTML=“New text”;

I believe with this small correction you will be able to run your code.

Hi @kirthickrubhan123,

It should be getElementById() instead of getElementsaById.

1 Like

thank you for your answer

thank you for your answer

use getElementById()

Yes it should be getElementById()

Hii @kirthickrubhan123
Method names are case-sensitive and spelling also matters a lot.
As you can observe in your code that you have written getElementsaById() instead of getElementById(). This method name follows camel case(Each word, except the first, starts with a capital letter) which should be taken care off.