My question is can we use the Document.write in a loop? As the following code doesn't works well. Guess what wrong in it!
<script type="text/javascript">
var d = 1;
var p;
while (days <= 4){
p = prompt("value of p?",0);
document.write("the value of p" + p);
p=p+p;
d++;
};
</script>