Question
Question 1 (1 point) Javascript uses ___ notation for chaining objects and properties in a single statement. (This notation uses periods). Question 1 options: Save
Question 1 (1 point)
Javascript uses ___ notation for chaining objects and properties in a single statement. (This notation uses periods).
Question 1 options:
Save
Question 2 (1 point)
The indexOf() method returns the index of the _____ occurrence of a specified string within a string.
Question 2 options:
Save
Question 3 (1 point)
What is the time complexity of the following loop? for (var i=0; i
Question 3 options:
| |||
| |||
| |||
|
Save
Question 4 (1 point)
What is the output of the following code? var fruits = ["Banana", "Orange"]; fruits.splice(1, 1); document.getElementById("demo").innerHTML = fruits;
Question 4 options:
Save
Question 5 (1 point)
A node of a Singly Linked List with property content (which is the node content) is passed to the following function - function f(n) { if (n == null) return " "; return n.content + f(n.next); } What is the output?
Question 5 options:
| |||
| |||
| |||
|
Save
Question 6 (1 point)
function Something() { this.head = null; } This is an acceptable example of
Question 6 options:
| |||
| |||
| |||
| |||
|
Save
Question 7 (1 point)
For a linked list with 6 nodes numbered 1-6, what will be the output of the following function function f2(n){ if (n == null) return " "; var s = n.content; if (n.next != null) s += f2(n.next); return s; }
Question 7 options:
| |||
| |||
| |||
|
Save
Question 8 (1 point)
The following function applied to a linked list with the nodes 1,2, 3, 4, 5, 6 will return what? function f2(n){ if (n == null) return " "; var s = n.content; if (n.next != null) s += f2(n.next.next); s += n.content; return s; }
Question 8 options:
| |||
| |||
| |||
|
Save
Question 9 (1 point)
function Something() { this.next = null; this.content = null; } This is an acceptable example of
Question 9 options:
| |||
| |||
| |||
|
Save
Question 10 (1 point)
You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?
Question 10 options:
| |||
| |||
| |||
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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