Section 1
by Louis Nguyen· Module 1: Engaging with JavaScript Fundamentals

Root Folder
Not Attempted
NameProgress
JavaScript for Beginners Introduction
Not Read
Setting up environment
Not Read
Section 1
Section 2
Section 3
Module 1 Quiz
Not Attempted
Module 2: Introduction to Variables and Data Types
Not Attempted
NameProgress
Section 1
Not Read
Arithmetic Operations
Not Read
Type Conversion
Not Read
Module 3
Not Attempted
NameProgress
Section 1
Not Attempted
Section 2
Not Attempted
0 / 430 XP

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:

  • Open your text editor and create a new HTML file named index.html
  • Inside the HTML file, add the following code:
<!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>
  • Save the file and open it with the Live Server extension. Then, right-click, choose Inspect, and then navigate to the Console tab.
  • Finally, you should see the message “Hello World!” displayed

Maggie

Discuss with Maggie
Use the power of generative AI to interact with course content

Discussion

0 comments
Loading editor ...
Remember to be polite and report any undesirable behaviour

Category

Empty

Labels

Discussion has no labels

1 participant

user avatar

Priority

Notifications

You're not receiving notifications from this thread.
Course Outline
Module 1: Engaging with JavaScript Fundamentals
Module 2: Introduction to Variables and Data Types
Module 3
Module 4
Module 5