JavaScript analogRead

I have using the LDR to get the light intensity data but while I’m writing analogRead in js it is showing run time error in browser…whether we can able to write analogRead into javascript

@hari21032001

Can you please revert back with the relevant screenshots? Do share the code that you have written, it will help us in debugging your issue quickly.

Hey,
If the error comes while calling the function analogRead() then there may be syntax error.
Correct Syntax - val = analogRead(analogPin);
If not then make sure that your file extension is javascript and not html.
And also make sure that you use chrome browser.