Search Header Logo

CPD Quiz

Authored by Parameswaran Sajeenthiran

Professional Development

3rd Grade

Used 5+ times

CPD Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

const obj1 = {Name: "Hello", Age: 16};

const obj2 = {Name: "Hello", Age: 16};

console.log(obj1 === obj2);

true

false

undefined

None of the above

Answer explanation

The strict equality operator compares objects by their references so even though the contents of both objects are the same, their references don’t match resulting in false.

2.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

function test(...args) {

console.log(typeof args);

}

test(12);

NaN

Object

Array

Number

Answer explanation

The …args parameter allows us to collect all remaining arguments into an array, and in Javascript typeof an array is an object.

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

The process in which an object or data structure is translated into a format suitable for transferral over a network, or storage is called?

Object Serialization

Object Encapsualization

Object Inheritace

None of the Above

Answer explanation

Object Serialization is the process in which an object or data structure is translated into a format suitable for transferral over a network, or storage.

4.

MULTIPLE CHOICE QUESTION

1 min • 5 pts

What will be the output of the following code snippet?

function solve(arr, rotations){

if(rotations == 0) return arr;

for(let i = 0; i < rotations; i++){

let element = arr.pop();

arr.unshift(element);

}

return arr; }

console.log( solve([44, 1, 22, 111], 5));

[ 111, 4 ,1, 22]

[ 44 ,1 ,22 ,111]

[1,2,11, 4]

[1,2,11,4]

Answer explanation

Wrong Answer

The above code snippets rotate an array to its right by some specified number of times(here 5).

5.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

function factorial (n){

if (n==0){

return 1;

}

else {

return (n * factorial(n-1));

}

console.log(factorial(3))

3

6

0

12

Answer explanation

using recursion calculates the factorial of 3 (3!)= 1*2*3=6

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of the following is a dynamic data structure ?

stack

queue

Linked List

All of the Above

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?