Javascript basics 6

Javascript basics 6

Professional Development

29 Qs

quiz-placeholder

Similar activities

Le reti di computer 1

Le reti di computer 1

Professional Development

25 Qs

UNICEF Power Facts and Stats

UNICEF Power Facts and Stats

Professional Development

24 Qs

SOP

SOP

Professional Development

25 Qs

LPL NCR Sales Match 1

LPL NCR Sales Match 1

Professional Development

25 Qs

New Hire Orientation Pre-Test

New Hire Orientation Pre-Test

Professional Development

25 Qs

Audit Intern (0526)

Audit Intern (0526)

Professional Development

25 Qs

Latihan UP Bahasa Indonesia

Latihan UP Bahasa Indonesia

Professional Development

30 Qs

Customer Service

Customer Service

University - Professional Development

25 Qs

Javascript basics 6

Javascript basics 6

Assessment

Quiz

Professional Development

Professional Development

Practice Problem

Hard

Created by

Inna .

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the result of the following code? console.log(3 + '5');

8
35
53
15

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

How can you check if a variable x is of type "string"?

typeof(x) === 'string'
x.type === 'string'
x instanceof String
x.typeOf(String)

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the purpose of the === operator in JS?

It performs type coercion.
It assigns a value to a variable.
It checks for equality without type conversion.
It concatenates two strings.

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

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

let x = 5;
const y = 10;
var z = 15;
variable w = 20;

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will the following code snippet print to the console?const numbers = [1, 2, 3, 4, 5]; numbers.forEach(function(num) { console.log(num * 2); });

1 2 3 4 5
2 4 6 8 10
1 4 9 16 25
2 3 4 5 6

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the output of the following code snippet? let a = 10; if (a > 5) { console.log('Hello'); } else { console.log('World'); }

Hello
World
Hello World
No output

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

How do you write an if statement that checks if a number x is positive?

if (x >= 0) { }
if (x > 0) { }
if (x < 0) { }
if (x == 0) { }

Create a free account and access millions of resources

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?

Discover more resources for Professional Development