JavaScript Basics Quiz

JavaScript Basics Quiz

University

10 Qs

quiz-placeholder

Similar activities

Brainy Bites: Python

Brainy Bites: Python

University

12 Qs

lesson1 quiz

lesson1 quiz

6th Grade - Professional Development

7 Qs

Introduction to Python Programming Quiz 9E

Introduction to Python Programming Quiz 9E

10th Grade - University

13 Qs

Quiz on Object Oriented Programming and Java

Quiz on Object Oriented Programming and Java

University

15 Qs

Java Strings

Java Strings

1st Grade - Professional Development

10 Qs

Recordando JavaScript

Recordando JavaScript

University

10 Qs

PHP Beginners Quiz

PHP Beginners Quiz

University

15 Qs

Test de JavaScript

Test de JavaScript

University

10 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

Assessment

Quiz

Other

University

Easy

Created by

Sharfuddin Hyder

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a JavaScript variable?

variable x;

v x;

var x;

let = x;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a JavaScript data type?

String

Boolean

Float

Undefined

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write "Hello, World!" in an alert box?

alert("Hello, World!");

msgBox("Hello, World!");

msg("Hello, World!");

alertBox("Hello, World!");

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to assign a value to a variable?

=

==

===

=>

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write a single-line comment in JavaScript?

<!-- This is a comment -->

// This is a comment

/* This is a comment */

** This is a comment **

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will console.log(typeof []) output?

array

object

list

undefined

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a function in JavaScript?

function = myFunction() {}

function myFunction() {}

create function myFunction() {}

def myFunction() {}

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?