Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions