Enough of Theory
now that we've learnt enough of the theory , it's now time to write your first JavaScript Program π
Resources we're Going to use throughout the series
How to use Developer Tools
π Head over to Chrome Browser and type ctrl
+shift
+i
πhey what's this?
the part which is highlighted with red color is known as window which is used for displaying output
the part which is highlighted with yellow color is known as developer tools window which offers many functionalities for debugging and performance of web app
the part which is highlighted with green color is known as console which is used for seeing errors and responses of JS code , but we're using it for typing JS code , console helps to write code in live environment and throws output in console
π take a look at window opened in side , if you want to become a web developer chances are you'll open chrome dev tools on day to day basis for debugging your JavaScript code
Let's write first line of code
in the dev tools go to console and start typing the following code and hit enter :
console.log("Hello John");
π Notice that the part in ""(quotes) is the text we want to print and we can type whatever we want
π log method prints the text which is passes inside ("pass the text here")
π Exercise : Change hello john to hello + your name
Let me know in comment section if you have any doubt or feedback. it's always worth to give time to thriving developer community :)
Keep Coding β€
Top comments (0)