When i execute an if condition with the continue keyword in a while loop my browser dosen’t open

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

<!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>Document</title>
</head>
<body>
<head>LOOPS</head>
<h1 id=”string”></h1>
<script language=”javascript” type=”text/javascript”>
let w = 10;
while(w<=15){
console.log(w)
if(w==13){
continue;
}
w++
};

</script>
</body>
</html>

So…As you can see here, Whenever i live reload this on my browser(firefox, chrome) It just keeps on reloading and dosen’t open but when i use the for loop and then use the if condition to skip a loop, It opens.
Please is there something i’m doing wrong, Because i just started learning javascript.

‫أضف إجابة

تصفح
تصفح

مجهول يجيب