JavaScript Fundamentals for Grade 9

JavaScript Fundamentals for Grade 9

9th Grade

20 Qs

quiz-placeholder

Similar activities

JavaScript

JavaScript

3rd Grade - University

20 Qs

JavaScript Basic Terminology

JavaScript Basic Terminology

9th - 12th Grade

20 Qs

java script

java script

9th - 12th Grade

15 Qs

Gmetrix Intro to Programming Using JavaScript Session 1 Test

Gmetrix Intro to Programming Using JavaScript Session 1 Test

9th - 12th Grade

15 Qs

Python basics

Python basics

7th - 10th Grade

18 Qs

Computers & How They Work

Computers & How They Work

9th - 12th Grade

18 Qs

App Lab

App Lab

7th - 12th Grade

20 Qs

JavaScript basics

JavaScript basics

8th Grade - University

15 Qs

JavaScript Fundamentals for Grade 9

JavaScript Fundamentals for Grade 9

Assessment

Quiz

Computers

9th Grade

Hard

Created by

Kiranmayi Ravuri

Used 3+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in JavaScript?

A variable in JavaScript is a type of loop used for iteration.

A variable in JavaScript is a function that performs calculations.

A variable in JavaScript is a method for defining classes.

A variable in JavaScript is a named container for storing data values.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to declare a variable?

let x = 5;

x := 5;

const x = 5;

var x = 5;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type is used to represent true or false values?

integer

boolean

string

float

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a random number between 1 and 10 in JavaScript?

Math.ceil(Math.random() * 10)

Math.floor(Math.random() * 10) + 1

Math.random() * 10

Math.floor(Math.random() * 11)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression '5' + 5 in JavaScript?

55

55.0

'55'

10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to declare a constant variable?

const

final

static

immutable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write a conditional statement in JavaScript?

if (condition) { // code to execute if condition is true } else { // code to execute if condition is false }

if condition { // code }

condition ? // code : // code to execute

if (condition) // code to execute

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?