console.log("hello world") does not appear

Asked 2 years ago, Updated 2 years ago, 17 views

Editor

visual studio 2017
Windows 10
Create with empty html

Confirmation

After debacking the following html, hello is not displayed.Verified that javascript is allowed in chrome's Settings. The user agent style sheet says script {display:none;} but I don't know what to do from now on. Could you tell me?

I just want to practice javascript, but I can't.

<!DOCTYPE html>
<html>
<head>
    <metacharset="utf-8"/>
    <title> </title>
</head>
<body>
    <script>
        console.log("hello word")
    </script>
</body>
</html>

javascript

2022-09-29 22:43

2 Answers

Solution

The browser does not display characters directly.
It seems to be checked by chrome developer tool → console.


2022-09-29 22:43

console.log("hello word")
If it's troublesome to check with the developer tool → console in
alert("hello word") might be fine.
In this case, a pop-up will appear on the screen without having to display the developer tool.


2022-09-29 22:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.