Reputation: 127
I am using this code:
<script type = "text/javascript">
console.log("hello world");
</script>
How can I see the output of console.log()
?
I searched on Google but did not find a solution.
Upvotes: 6
Views: 60350
Reputation: 5578
The console.log();
statement prints anything in the browser console.
Look for Developer Tools
or Simply Tools
menu in all major browsers.
If you are using Google Chrome the press Cntrl+shift+j
to see console.
In Firefox, press Ctrl+Shift+I
and click on Console to view the console on Firefox.
Upvotes: 4
Reputation: 13
For Chrome browser follow these steps:
Upvotes: -1
Reputation: 1
You can add a chrome extension named "console log viewer" and then you can see the logs even without opening the developer tool
Upvotes: -1
Reputation: 1979
You can open the error console, depending on your browser. (Ctrl+Shift+J in Firefox, or F12 in Chrome, for example). Most browsers have the console hidden in their developer tools.
Upvotes: 7
Reputation: 13800
You need to view the result in the console. Open the console.
Also, you have a problem with your code.
<script type = "text/javascript">
console.log("hello world");
</script>
Is not valid. Remove the spaces in the script tag, like this:
<script type="text/javascript">
console.log("hello world");
</script>
Upvotes: 2
Reputation: 2713
first of all console.log()
of javascript cannot be outputed in your..
you need the javascript console to output it
first
press F12 then click the console label
before refreshing the browser to see your output..
but if your console.log()
alternatives for browser is document.write();
Upvotes: -1
Reputation: 2845
Upvotes: -1
Reputation: 354
press F12 in google chrome and click on console to see the output
Upvotes: 0