Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A function will stop executing when it reaches a _____ statement. Question 1 options: Save Question 2 (1 point) To return an element with the

A function will stop executing when it reaches a _____ statement.

Question 1 options:

Save

Question 2 (1 point)

image text in transcribed

To return an element with the id demo from the document (this will return the element, not the contents or state) - write the code as you would in the html document - just the one line. var element = ____________;

Question 2 options:

Save

Question 3 (1 point)

image text in transcribed

What is the time complexity of the following function? function fun(n) { if (n

Question 3 options:

1)

O(1)

2)

O(n)

3)

O(n^2)

4)

O(n logn)

Save

Question 4 (1 point)

image text in transcribed

What is the output of the following code? var fruits = ["Banana", "Orange"]; fruits.splice(1, 1, "Lemon", "Kiwi"); document.getElementById("demo").innerHTML = fruits;

Question 4 options:

Save

Question 5 (1 point)

image text in transcribed

What will be the output of the following code? var abc = ["A", "B"]; var num = ["1", "2", "3"]; var newA = abc.concat(num); document.getElementById("demo").innerHTML = abc;

Question 5 options:

Save

Question 6 (1 point)

image text in transcribed

What will be the output of the following code? var fruits = ["Banana", "Orange", "Apple"]; fruits.shift(); document.getElementById("demo").innerHTML = fruits;

Question 6 options:

Save

Question 7 (1 point)

image text in transcribed

The push method adds an element to the end of an array.

Question 7 options:

1) True
2) False

Save

Question 8 (1 point)

image text in transcribed

What will be the output of the following code? var a = ["3", "2", "1"]; document.getElementById("demo").innerHTML = a.sort();

Question 8 options:

Save

Question 9 (1 point)

image text in transcribed

What will be the output of the following code? var a = ["1", "2"]; document.getElementById("demo").innerHTML = a;

Question 9 options:

Save

Question 10 (1 point)

image text in transcribed

What will be the output of the following code? var fruits = ["Banana", "Orange", "Apple", "Mango"]; document.getElementById("demo1").innerHTML = fruits.pop();

Question 10 options:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+2 Estimate the same percentage for your own country or community.

Answered: 1 week ago