Today #day21 of #100daysofcode, I have completed lesson one and a practice program in JS. @Sololearn
Introduction to JavaScript
what is JavaScript?
- JavaScript is one of the most popular programming languages which makes websites dynamic and interactive to user.
what can you do with JavaScript?
- To create mobile apps and games, process data, and much more!
The console
what is the developer’s console?
- Console is the main weapon used by web developers to test code & fix bugs and work on errors in code as they are not visible on the web page.
Logging Messages
- Diagnose and troubleshoot minor issues in your code and display the results of your code & alert when there is an error.
console.log('All good, no errors')
console.log('JS rocks')
Text Messages
- You need to enclose the text message AKA string type in JavaScript with single or double quotation marks.
console.log('Testing in progress')
console.log(" always enclose text
message in quotes")
Code
Conclusion:
- JavaScript is a very popular programming language.
- Web developers use the console to test code and fix bugs.
- You can use console.log() to write or log messages to the console.
- Wrap the text message in quotes in JavaScript.