Name | Progress |
---|---|
JavaScript for Beginners Introduction | Not Read |
Setting up environment | Not Read |
Name | Progress |
---|---|
Section 1 | Not Read |
Arithmetic Operations | Not Read |
Type Conversion | Not Read |
Name | Progress |
---|---|
Section 1 | Not Attempted |
Section 2 | Not Attempted |
Your first task will be to write a simple JavaScript script that displays a message in the browser console.
console.log() is a method of the console object in JavaScript. When you call console.log(), you can pass almost any type of JavaScript data as arguments including strings, numbers, arrays, objects, and more. You can display simple text, complex expressions, and even full objects and arrays in an easy-to-read format.
Step-by-step guide:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>JavaScript tutorial for beginners</title>
</head>
<body>
<script> console.log("Hello World!") </script>
</body>
</html>
Finally, you should see the message “Hello World!” displayed