17 lines
		
	
	
		
			651 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			651 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								title: Use the JavaScript Console
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								Both Chrome and Firefox have excellent JavaScript consoles, also known as DevTools, for debugging your JavaScript.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								You can find Developer tools in your Chrome's menu or Web Console in FireFox's menu. If you're using a different browser, or a mobile phone, we strongly recommend switching to desktop Firefox or Chrome.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								You can also use <a href='https://repl.it/' target='_blank' rel='nofollow'>https://repl.it/</a> to run code online.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								This is how you print to the console:
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    console.log('Hello world!')
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Also You can print an error log in the console with this code:
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    console.error('I am an error!')
							 |