how to connect buzzer in bolt chip and what is coding for that in js

how to connect buzzer in bolt chip and what is coding for that in js

use male to female jumper wires and connect the longer pin of the buzzer to 0 and shorter pin to ground and your hardware circuit is ready!
this is how malet to female jumper wires look like
male-to-female-jumper-wire-500x500|500x500
buzzer circuit connection.

//Javascript code to turn the buzzer on and off
<html>
<head>
<title> Buzzer test </title>
</head>
<body>
<button onClick=“onoff(“0”,“HIGH”)”>On</button>
<button onClick=“onoff(“0”,“LOW”)”>OFF</button>
<script type=“text/javascript” src=“https://cloud.boltiot.com/static/js/boltCommands.js”></script>
<script type=“text/javascript”>setKey(’{{ApiKey}}’,’{{Name}}’);</script>
<script>
function onoff(pin,state){
digitalWrite(pin,state);
}
</script>

Thanks brother @sampatkumar.mca17

Connect the positive end (longer end) of the Buzzer onto the Pin 0 using Male to Female connecting wire and similarly connect the ground(shorter end) of the buzzer onto Pin GND of Bolt WiFi module. The end connections will be as shown in the image below.

code://

Bolt IoT Platform ON OFF