Javascript Basic

Javascript Basic

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

Web JavaScript

Web JavaScript

10th Grade - University

15 Qs

Camp 1_30

Camp 1_30

12th Grade

22 Qs

PHP

PHP

12th Grade

20 Qs

HTML CSS JS

HTML CSS JS

9th - 12th Grade

20 Qs

Python

Python

11th Grade

20 Qs

JavaScript Basics CodeHS

JavaScript Basics CodeHS

7th - 12th Grade

20 Qs

JQuery Quiz for Level X

JQuery Quiz for Level X

10th Grade

15 Qs

Java Script Quiz

Java Script Quiz

9th - 12th Grade

15 Qs

Javascript Basic

Javascript Basic

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

iqbal yunanto

Used 33+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a JavaScript variable?

A container that holds a value

A function that performs a task

A way to add styles to a website

A type of data

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

How do you write a JavaScript string?

"Hello World!"

Hello World!

'Hello World!'

`Hello World!`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between = and == in JavaScript?

= assigns a value to a variable and == compares values

= compares values and == assigns a value to a variable

= and == are the same thing

= assigns a value to a variable and == assigns a value to a variable

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a JavaScript function?

create function myFunction() {}

new function myFunction() {}

myFunction() {}

function myFunction() {}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write a JavaScript alert?

alert = "Hello World!";

alert {Hello World!};

alert("Hello World!");

alert "Hello World!";

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How do you write a JavaScript comment?

# This is a comment

// This is a comment

/* This is a comment */

-- This is a comment

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you change the background color of an HTML element using JavaScript?

element.color = "red";

element.background = "red";

element.style.backgroundColor = "red";

element.setBackground("red");

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?