Search Header Logo

Object & Array in Javascript

Authored by Mostafa Hazareh

Professional Development

Professional Development

Used 9+ times

Object & Array in Javascript
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Which object method is used?

Object.keys()

Object.values()

Object.create()

Object.assign()

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which one is the correct result?

const person = {

name: 'mostafa',

email:'mostafa@me.com',

phone: 23456

}

console.log( Object.keys());

[name, email, phone]

['mostafa', 'email', phone]

[mostafa, mostafa@me.com, 23456]

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

which method is correct?

let person = {

name: 'katja',

email:'katja@me.com'

};

let personAdd = {

location: 'Espoo'

};

output: {name:'katja', email:'katja@me.com', location:'Espoo' }

Object.create()

object.keys()

Object.assign()

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

which method adds items to the end of an Array?

array.pop()

array.push()

array.shift()

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Which array method is used?

names.push()

names.pop()

names.shift()

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How remove 'Mona' and 'Kirsi' from the names list?

const names = ['Mostafa', 'Mona', 'Kirsi', 'Katja'];

names.push('Mona', 'Kirsi')

names.slice(1, 3)

names.unshift( 'Mona', 'Kirsi')

names.slice(2,2)

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

 

How add 'Mona' and 'Kirsi' in the middle of the names list?

const names = ['Mostafa', 'Jessi', 'John', 'Katja'];

names.slice(2, 2)

names.unshift('Mona', 'Kirsi')

names.splice(2, 0, 'Mona', 'Kirsi')

names.push('Mona', 'Kirsi')

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?

Discover more resources for Professional Development