Javascript basics 6

Javascript basics 6

Professional Development

29 Qs

quiz-placeholder

Similar activities

L1TU7

L1TU7

6th Grade - Professional Development

30 Qs

test per security

test per security

Professional Development

34 Qs

Session 7 LNMIIT

Session 7 LNMIIT

Professional Development

30 Qs

Arabic Interference in English Language Learning

Arabic Interference in English Language Learning

University - Professional Development

25 Qs

React Native Pre-Assessment

React Native Pre-Assessment

Professional Development

34 Qs

Google Trainer Skillz

Google Trainer Skillz

Professional Development

24 Qs

Perfils mobils linux

Perfils mobils linux

Professional Development

24 Qs

THE ENTERPRISE AMBASSADORS CRM COURSE QUIZ (PT 2)

THE ENTERPRISE AMBASSADORS CRM COURSE QUIZ (PT 2)

Professional Development

30 Qs

Javascript basics 6

Javascript basics 6

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

Inna .

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?