Unable to get value from IR Sensor

The programming code given in internshala tutorials for IR Sensor using JavaScript is unable to give output value.

Hi,

Please change the following line in the code
FROM
onclick = “digitalRead(4,output);”
TO
onclick = 'digitalRead(4,“output”);'

Note the single quotes surrounding the code and double quotes surrounding the word output

@rahul.singh Please make the above changes in internshala code.

@raunak.rtu Thank you for pointing out the same.