Write a program that asks the user for a number and then counts up from 0 to that number using a while loop || Javascript example ||
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Write a program that asks the user for a number and then counts up from 0 to that number using a while loop.
</title>
</head>
<body>
<script>
let result=parseInt (prompt("enter a number"));
let count=0;
while(count <= result)
{
console.log(count)
count++;
}
</script>
</body>
</html>