Question: QUESTION 10 What does the variable m hold after these lines execute? var x = [red, orange, yellow, green, blue]; m = x.splice(2, 2); [red,yellow]

QUESTION 10

What does the variable m hold after these lines execute?

var x = ["red", "orange", "yellow"", "green", "blue"]; m = x.splice(2, 2);

["red","yellow"]

["yellow","green"]

["red", "orange"]

"["orange","yellow"]

QUESTION 12

This code is an example of ____.

if(document.getElementById) { x = document.getElementById("box").value; } else { x = document.form1.box1.value; }

browser sniffing

browser detection

feature detection

magic number insertion

QUESTION 16

Consider the code below. How do you read Joe's age into the variable y?

var people = [ {name: "stu", age: 23, height: 72}, {name: "sue", age: 29, height: 72}, {name: "joe", age: 33, height: 72}, {name: "moe", age: 42, height: 72} ];

y = joe.age;

y = people.joe;

y = people[3].age;

y = people[2].age;

What will the variable x hold after the loop finishes? var x = 1; for(var i = 0; i < 5; i++) { x = x + 2; }

11

9

8

none of the above

"Consider the code below. How do your read the value of the width into a variable named w?"

var rect = {length: 9, width: 6};

w = width

w = rect[0]

w = rect.width

w = rect[1]

QUESTION 21

How many times will this loop execute?

x = 0; sum = 0; while(x < 4) { sum = sum + 10; }

0

3

4

infinity

QUESTION 22

You run this code in March 2014. what is m?

d = new Date(); m = d.getMonth();

3

Mar

2

March

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!