<script> </script> in the header is not part of the console in the border browser

Taking training for software immersion. I don't care about the best practice of where to embed javascript code in an HTML document. Most likely, help me understand why the following code did not enter the console in the Edge browser.

<head> <title>Layout Work</title> <meta lang="en" charset="utf-8"> <link rel="stylesheet" type="text/css" href="css/normalize.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <script> var bottles = 99; var beerSongPartOne = " bottles of beer on the wall!"; var beerSongPartTwo = " bottles of beer!"; var beerSongPartThree = "take one down pass it around"; while (bottles > 0) { console.log(bottles + beerSongPartOne); console.log(bottles + beerSongPartTwo); var bottles = bottles - 1; console.log(beerSongPartThree); console.log(bottles + beerSongPartOne); } </script> </head> 
+5
source share
1 answer

For reference to the future ...

According to Microsoft, the EDGE console does not log messages without opening the console. This is "by design." First you must open the console to record any result.

I think this is a rather strange design choice, seeing how all the other major browsers log events in the background. I would be interested to know why the developers decided it was a good idea. If someone knows that he is free to call.

+3
source

Source: https://habr.com/ru/post/1241192/