Frontend Quiz-6 Summer internship

Frontend Quiz-6 Summer internship

University

10 Qs

quiz-placeholder

Similar activities

Creating Web Pages

Creating Web Pages

University

10 Qs

Day -5 Workshop Quiz

Day -5 Workshop Quiz

University

15 Qs

CSC264 Javascript Basic

CSC264 Javascript Basic

University

15 Qs

test

test

University

15 Qs

Java Script Pro

Java Script Pro

3rd Grade - University

12 Qs

Java set3

Java set3

University

10 Qs

obj

obj

8th Grade - Professional Development

9 Qs

TE COMP C#

TE COMP C#

University

9 Qs

Frontend Quiz-6 Summer internship

Frontend Quiz-6 Summer internship

Assessment

Quiz

Other

University

Easy

Created by

Gnaneshwar Reddy

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a JavaScript object?

A) var obj = {};

B) var obj = ();

C) var obj = [];

D) var obj = {};

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add a property to an existing JavaScript object?

A) obj.property = value;

B) obj->property = value;

C) obj.property(value);

D) obj[property] = value;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to select an element by its ID in the DOM?

A) document.querySelector("#id");

B) document.getElementById("id");

C)

document.getElementsByClassName("id");

D) document.getElementByTagName("id");

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for an if statement in JavaScript?

A) if (condition) {}

B) if condition {}

C) if [condition] {}

D) if {condition} {}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the "switch" statement do in JavaScript?

A) Iterates over a collection

B) Switches the value of a variable

C) Evaluates an expression and matches the value to a case clause

D) Changes the value of a variable based on its type

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to create a new HTML element in the DOM?

A) document.createElement("tagName");

B) document.newElement("tagName");

C) document.buildElement("tagName");

D) document.addElement("tagName");

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if an object has a specific property?

A) object.hasProperty("property");

B) object.contains("property");

C) object.hasOwnProperty("property");

D) object.include("property");

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?