JavaScript Basics

JavaScript Basics

Professional Development

15 Qs

quiz-placeholder

Similar activities

JavaScript Arrays and Objects

JavaScript Arrays and Objects

Professional Development

14 Qs

CSS Unit 1

CSS Unit 1

Professional Development

20 Qs

TEC-T96

TEC-T96

Professional Development

13 Qs

Python End of Module Touchpoint

Python End of Module Touchpoint

Professional Development

20 Qs

Javascript-2

Javascript-2

Professional Development

18 Qs

String Methods

String Methods

Professional Development

10 Qs

IoT และโหนด -Red

IoT และโหนด -Red

University - Professional Development

10 Qs

Google Earth Engine - Gold Mining Monitoring

Google Earth Engine - Gold Mining Monitoring

Professional Development

15 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?