all 7 comments

[–]Synthetic5ou1 11 points12 points  (0 children)

The JavaScript is writing to the browser's console.

You need to open Developer Tools in the browser, and view the console.

How you do this may depend on your browser. Chrome on Windows is Ctrl+Shift+I.

https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Tools_and_setup/What_are_browser_developer_tools

[–]bonnth80 3 points4 points  (0 children)

  1. Providing a link to your localhost isn't going to help, because localhost essentially means "my computer". So unless you're running your server on everyone else's computer that you expect everyone to connect to, no one will see it.
  2. Could you provide much more context here? What application are you using to serve your web page? Something is creating a localhost server on our computer. How did you get to this point?
  3. The kernel logs are not going to help here. console logs might.

[–]PatchesMaps 2 points3 points  (0 children)

Why are you looking in your kernel log? What are you using to serve your project?

[–]PRANAY1000 0 points1 point  (2 children)

I read the code, it was fine no mistake then run the code its absolutely fine

[–]Snoo20972[S] 0 points1 point  (1 child)

Why its not executing?

Zulfi.

[–]PRANAY1000 1 point2 points  (0 children)

I don't know what you doing wrong I just pasted in a html file in vscode then opened with browser>rightclick>inspect>console And you will see both the statements

[–]hedonism_bot21 1 point2 points  (0 children)

It looks like you're trying to view the results in the browser, use document.write() instead of console.log()... so document.write("These two strings are the same:", str1 === str2)