Search Header Logo

JavaScript Skills Assessment

Authored by Vishnu M

English

12th Grade

Used 2+ times

JavaScript Skills Assessment
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct way to declare a variable in JavaScript?

int variableName;

declare variableName;

variableName = 5;

let variableName; or const variableName; or var variableName;

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a primitive data type in JavaScript?

number

boolean

object

string

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will the following code output: console.log(5 > 3 && 2 < 4);?

null

true

false

undefined

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you define a function in JavaScript?

myFunction(param1, param2) { // function body }

function:myFunction(param1, param2) { // function body }

define myFunction(param1, param2) => { // function body }

function myFunction(param1, param2) { // function body }

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the scope of a variable declared with 'let' inside a block?

The scope of a variable declared with 'let' is global.

The scope of a variable declared with 'let' is limited to the entire script.

The scope of a variable declared with 'let' inside a block is limited to that block.

The scope of a variable declared with 'let' is limited to the entire function.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How can you access the second element of an array named 'fruits'?

fruits[1]

fruits(1)

fruits[2]

fruits.get(1)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code: var obj = {name: 'John', age: 30}; console.log(obj['name']);?

John

Jane

30

Doe

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?