Код: Выделить всё
let x=1;
while (x!=5){
x+=1;
return console.log(x);
};
do {
x+=1;
return console.log(x);
} while (x
Подробнее здесь: [url]https://stackoverflow.com/questions/79683958/why-is-it-in-when-im-returning-a-while-loop-followed-by-a-do-while-loop-follo[/url]