Search Header Logo

Basic JavaScript

Authored by Daniel Adesoji

Professional Development

Professional Development

Used 37+ times

Basic JavaScript
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in JavaScript?

variable = 10;

const variable = 10;

variable := 10;

variable == 10;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression: 5 + "5";

10

"55"

Nan

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to display a message in the browser's console

console.print()

log()

print()

console.log()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a function in JavaScript?

function = myFunction() {}

function myFunction() {}

let myFunction() {}

function myFunction: {}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

10

5

undefined

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create an array in JavaScript?

array = [1, 2, 3];

array(1, 2, 3);

array = {1, 2, 3};

array = (1, 2, 3)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression true && false

true

false

undefined

Error

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?