Regarding script

Dear sir/madam,
I am writing this forum to find out why the buzzer is working by using javascript but if i change the code to html my buzzer stops working.
In light of above situation i would request you to reply at your earliest convinience.
Thanking you.
Here is the screen shot below of my code.

yours sincerely,

To check if your code is correct -

First, connect a Led to the 0 and GND pin and check if it working with your code(Without resistor). If it working it means your code is fine. There is some issue with the buzzer connection.

If led is not working, it means there is some issue with the code. Open console in chrome and check for error or warning message.

@me23btech11058 Also do share a photo of your buzzer connections with the Bolt.

Make sure your Bolt is online (GREEN LED stable). When you try the ON and OFF command.