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.


Please change the following line in the code
onclick = “digitalRead(4,output);”
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.