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.
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.
Share Improve this question edited Nov 21, 2012 at 9:44 Joachim Sauer 308k59 gold badges566 silver badges621 bronze badges asked Nov 21, 2012 at 9:41 Php PhpPhp Php 1271 gold badge4 silver badges10 bronze badges 1- 1 Press F12, check the "Console" tab. – Sjoerd Commented Nov 21, 2012 at 9:42
8 Answers
Reset to default 7You 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.
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.
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>
press F12 in google chrome and click on console to see the output
- Open firefox
- Go to tools and then add-on.
- Search and install an add-on named "firebug"
- before reloading your page open firebug and go to console tab.
You will see your desired result. If you have chrome then its already there. just use it
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();
You can add a chrome extension named "console log viewer" and then you can see the logs even without opening the developer tool
For Chrome browser follow these steps:
- click on More tools on the right side of the top
- click on Developer tools
- click on console