Code editors facilitate us when we want to write Javascript code. As of this JS tutorial we have only been writing our code in the console window. Now we need to write more advanced scripts the console interface is too simple. Also when refreshing the page all our instructions are lost, whereas if we save our instructions into a Javascript file on persistent storage it will remember, persist, to keep our instructions.
We have a basic HTML file which you can write Javascript within the HTML file but this is not good. HTML is markup code where we design the structure of the page not the application logic which is done in the background. So our application logic or Javascript can be separated into a Javascript file away from our HTML.
Finally we’ll review the console.log() method which will allow us to output data to the console window. This is great for debugging, when writing scripts it can often make sense but when executing in the browser things may go wrong. So when logging data out to the console we can identify what our script’s are doing with the data and modify our code accordingly.
This tutorial is brought to you by http://www.avelx.co.uk/ – Coding tutorials to help you grow.
Original source
6 responses to “Javascript Tutorial | Code Editors & Debugging | Ep10”
Also, you can put (async) attribute in the Script tag while it in the head and It will render it like if it was at the end of the code.
Great!!
Can you explain the event loop
This channel should have 1000s of subs, very high quality content
This is great. Thank you so much.
likeeeeeeee