Question
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)
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)
What is the time complexity of the following function? function fun(n) { if (n
Question 3 options:
| |||
| |||
| |||
|
Save
Question 4 (1 point)
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)
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)
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)
The push method adds an element to the end of an array.
Question 7 options:
1) True | |
2) False |
Save
Question 8 (1 point)
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)
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)
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started