please help me with this.
I have observed that the alert window appeared 6 times instead of 5 times for the below code. Please tell me why its happening.
//html part
<html>
<body>
<script src = "somesample.js">
</script>
<script>
a();
</script>
</body>
</html>
//Js part
function a(){
var b= prompt("Enter the value")
for (var i=0; i<5; i++)
{
alert(b);
}
};