pencil-icon
Build your own quiz

Computers

Image

KA JS Objects

67
plays

6 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt
    Which of these is a valid line of JS code that stores an object in a variable?
    var me = {age=31, hair='brown'};
    var me = {age: 31, hair: 'brown'};
    var me = {age:31 hair:'brown'};
    var me = {var age=31, var hair='brown'};
  • 2. Multiple Choice
    30 seconds
    1 pt
    Which of these objects have 3 properties?
    var me = {age: 31, hair: 'brown'};
    var me = {age: 31};
    var me = {age: 31, hair: 'brown', eyes: 'blue'};
    var me = {hair: ['brown', 'blonde', 'pink']};
  • 3. Multiple Choice
    30 seconds
    1 pt
    Let's say you're storing an object in a variable named 'angel' with the property 'fur'. Which line of code would change that property's value?
    angel.fur = 'orange';
    angel[fur] = 'orange';
    angel_fur = 'orange';
    var angel.fur = 'orange';
  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?