Search Header Logo

JavaScript Fundamentals for Grade 9

Authored by Kiranmayi Ravuri

Computers

9th Grade

Used 3+ times

JavaScript Fundamentals for Grade 9
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?