JavaScript Basics

JavaScript Basics

Professional Development

15 Qs

quiz-placeholder

Similar activities

Lists and operators

Lists and operators

Professional Development

15 Qs

Quizz for Javascript and typescript

Quizz for Javascript and typescript

Professional Development

20 Qs

IoT และโหนด -Red

IoT และโหนด -Red

University - Professional Development

10 Qs

Python & SQL

Python & SQL

Professional Development

15 Qs

LWC Quiz 1

LWC Quiz 1

Professional Development

10 Qs

Mastering HTML, CSS, and JavaScript

Mastering HTML, CSS, and JavaScript

Professional Development

12 Qs

Pretest 4

Pretest 4

Professional Development

15 Qs

Digital Journey at Asuransi Astra

Digital Journey at Asuransi Astra

Professional Development

10 Qs

JavaScript Basics

JavaScript Basics

Assessment

Quiz

Other

Professional Development

Hard

Created by

Drake Harrington

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to output "Hello World" in JavaScript?

`print("Hello World")`

`console.log("Hello World")`

`echo "Hello World"`

`System.out.println("Hello World")`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a JavaScript data type?

`string`

`integer`

`character`

`decimal`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a function in JavaScript?

`function myFunction()`

`def myFunction()`

`create myFunction()`

`function:myFunction()`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you call a function named `myFunction` in JavaScript?

`call myFunction()`

`myFunction()`

`call function myFunction()`

`execute myFunction()`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare a variable in JavaScript?

`var myVar;`

`variable myVar;`

`v myVar;`

`declare myVar;`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol is used for comments in JavaScript?

`//`

`#`

`/* */`

``

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

`var colors = "red", "green", "blue";`

`var colors = ["red", "green", "blue"];`

`var colors = (1:"red", 2:"green", 3:"blue");`

`var colors = {"red", "green", "blue"};`

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?