Cop final 2500

¡Supera tus tareas y exámenes ahora con Quizwiz!

An operator used for concatenation

+

Difference between ++x and x++

++x is pre increment and x++ is post increment

What is a valid block comment in JavaScript?

/*This is a block comment*/

An inline comment is written as

// This is an inline comment

When using the Math.random() function of the Math object random numbers returned are between

0 (inclusive) and 1(exclusive)

How many times does a do/while loop execute as a minimum

1

jQuery timer $("#ball_holder").everyTime(100, function(){ $("#ball_holder").animate({top:"184px"}, 400).animate({top:"0px"}, 370); }); is executing every __________.

100 milliseconds

var sum = 19 + 83 which parts are the operands?

19 and 83

The ternary operator, which can be used to replace an if/else conditional statement, requires how many operands?

3

When using the concatenation what output would display based on the statement: document.write(102+201)

303

varword= "COP 2500 Concepts in Computer Science"; what would be the result of the word length be?

37

var message = 6 + 1 + 1 + " pets is probably too many!"; alert(message); What would be the output of this statement

8 pets is probably too many!

Where in an HTML document can functions be called

<a></a> <body></body> <head></head>

Tag element for defining hte clickable areas of an image map?

<area>

Tag element for creating the image map in HTML

<map>

The Html tag element creates a table row in a table

<tr>

<div> is used for

A division or section in an HTML document

An output of the HTML tag element <hr> when the HTML file is loaded in a web browser

A horizontal line

Website lifecycle is a request/response loop. A request is made when

A user types in ucf.edu in the URL

$(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); })

All <p> tag elements

Which rule can be used to specify all of a Web site's style in one CSS file?

Amedia

document.getElementById("theDashes").innerHTML what does this reference?

An HTML element with the id attribute set to theDashes

Nested array

An array that contains another array, similar to the row/column concept, two-dimensional array.

After a function has been declared in the <head></head> section of the HTML document, how many times can it be used in the <body></body>

As many times it's required

var states = new Array(); states["CA"] = "90210"; states["ME"] = "01234"; states["MT"] = "55641"; states["FL"] = "32829"; What type of array is this

Associative

Recursion is a function that

Calls itself

Bit is short for

Binary Digit

JavaScript supported object include

Browser objects, Document objects, User-defined objects

var weekdays = new Array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday"); What array statement is this?

Condensed

Boolean, const, string, numeric. What doesn't belong?

Const

To declare a constant, a value that cannot be changed during programming execution requires the use of keyword

Const

Decision making constructs for control flow such as if, if/else, if/else if, and switch are called

Control expression

When passing data to a function in JavaScript :

Data values passed to a function are called arguments, enclosed in parantheses. Multiple data values passed to a function are separated using a comma

var my Array= new Array(100); what's the purpose of 100?

Declares the initial size and allocates memory

$(document).ready(function(){ $("img").dblclick(function(){ $(".test").hide(); }); });

Double click an HTML tag element

A single Web page can contain a most one form.T/F

False

jQuery Events are not specific to respond to fired events in an HTML page. T/F

False

jQuery animation cannot be stopped once it's started. T/F

False

var mathClass = new Math();. When using functions from the MAth object you must declare an instance of the Math object.

False

Data hierarchy comprises bits, characters, records, files and

Fields

Variables declared outside of functions that can be used or changed anywhere in the program are called

Global variables

JavaScript is used to enhance ___ Web pages for an interactive experience.

HTML

Which positional numbering system includes valid values 0-9 and A-F

Hex

JavaScript can

Improve website usability

<script> var counter = 0; while( counter < 5 ) { document.writeln( counter * 2); } What's the output?

Infinite loop

Javascript programs are executed by a JavaScript _______ in a Web Browser

Interpreter

In the computer science the UNIX start date is defined as starting on

January 1, 1970 )):00:00:00

jQuery is a ___ library to simplify JavaScript programming.

JavaScript

$(document).ready(function(){ $("#updownmouse").mousedown(function(){ alert("Mouse down over footprint!"); }); });

Left mouse button is pressed down over the HTML element

Numeric Arrays use ___ as their index value and associative array use ___ as their index value

Numbers, strings

Kerning is the space between ___, while tracking is the space between ___.

Letters, words

<br> element is known as

Line break

A valid color gradient in CSS

Linear Radial Repeating

What are the three ways to create an array in JavaScript?

Literal, Regular, Condensed

&& and || are

Logical operators

JavaScript is a ___ programming language.

Loosely typed

78. There are two attributes of the Date object that start at 0 rather than 1, just to mess with us mere humans ☺, which attributes illogically start at 0 even though day of the month starts at 1?

Month and Day of the Week

<script> var asterisk = "*"; for (var row = 0; row < 10; row++) { for (var column = 0; column < row; column++) { document.writeln(asterisk); } document.writeln("<br>"); } </script> This is an example of what type of loop

Nested loop

When using the typeof() function what does a value of null mean?

No valid data type

function setLetter(word,letter, display) How many arguments must be passed for the function to compile?

None are required to compile or run

What is the result of jQuery function $(document).ready(function(){ $("input").focus(function(){ $(this).css("background- color","#cccccc"); }); $("input").blur(function(){ $(this).css("background-color","#ffffff"); }); }); when the user's mouse has focus on then loses focus of the HTML element <input />?

On focus the background color chages to #ccccccc, lose focus the background color changes to #ffff

JavaScript is a client-side language because it works

On the local computer

Local variables aredeclared inside of JavaScript functions and can be used or modified

Only in the functions they are declared

When a function is defined in JavaScript the expected received data values are called

Parameters

76. var index = word.search( letter ); uses which String object method?

Search

When defining a clickable area of an image map, what are the shape options

Rect Circle Poly

var weekdays = new Array(); weekdays[0] = "Monday"; weekdays[1] = "Tuesday"; weekdays[2] = "Wednesday"; weekdays[3] = "Thursday"; weekdays[4] = "Friday"; What format is this

Regular

The JavaScript logical not operator (!) results in the

Reverse evaluation of the condition

$(document).ready(function(){ $("button").click(function(){ $("#test").hide(); }); });

Single click an HTML tag element

Primitive data types are assigned

Single literal values

When asked to develop unobtrusive JAvaScript this means that the JavaScript is

Stored in an external file with a .is file extention

var num1 = 8675; var myString = String(num1); var result = myString + 309; alert("String result is " + result); What's the output?

String result is 8675309

Operands can be of data type

String, Numeric, Boolean

75. word = word.substr( 0, index ) + '-' + word.substr( index + 1 ); uses which String object method?

Substring

switch (color) { case "blue": alert("cold"); case "red": alert("hot"); default: alert("No temperature selected"); } What is this?

Switch, multi-way decision, Alternative to the if/else condition

What are the two types of drop shadows available in CSS

Text and box

What does would var date = new Date(); return when printed?

The day of the week, date, time, and time zone of the time the function was executed.

Assuming good HTML form and embedded <script></script>, when using concatenation what output would display based on the statement: document,write("The temperature is " +89);

The temperature is89

User-defined Objects are composite data types. T/F

True

var date= new Date(14,9,22);

Thu Oct 22 1914 00:00:00 <some time zone depending upon the computer>

All selectors in jQuery start with $(). T/F

True

CSS is the style sheet language used to specify the appearance of the HTML page

True

HTML tag element <input> is an HTML button. T/F

True

JQuery queue functionality allows for multiple animate function calls in one function that are called sequentially on a single HTML, tag element. T/F

True

Composite data types, also known as comples types, consist of more than one component. Valid composite data types include all of the following(Functions,Objets, Arrays) BUT

Undefined

CSS precedence begins at the broadest definition and finishes with the most finite defintion; browser, user-defined, external, embedded, and inline. How can you force the highest level of precedence?

Use keyword !important

To set a style rule using CSS you must include the selector, property, and

Value

if("14" = = 14) alert("Values are equal"); else if("14" = = = 14) alert("Values are identical"); else alert("Values are not equal or identical"); what would be the displayed to the user in an alert dialog box?

Values are equal

Anonymous funcitons in JavaScript are unique because its definition is assigned to a ___ since they don't have a ___.

Variable, name

What is the purpose of $(document).ready(function (){})

Verifies the document is finished loading before performing any actions

Variable scope in JavaScript defines where the variable is___ in the program or where it can be used.

Visible

Difference between a while loop and a do/while loop

While loops executes 0...n times; do/while loop executes 1...n times.

Example 1: dog.breed = "German Shepard"; Example 2: dog["breed"] = "German Shepard"; Do they have equivalent results?

Yes

Well-formed statements written in JavaScript end with

a semi colon ;

When creating an array in JavaScript using varmyArray= new Array();, Array() is called a

contructor

HTML tag <img> is used to insert an ___ in the document.

image

What is <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> referencing?

jQuery library

<script type="text/javascript" src="jquery.timers-1.1.2.js" ></script> What's it referencing?

jQuery timers

In computer science the date/time is measured in

milliseconds

To group options buttons so that selecting one deselects all of the others, you must make the ___ attribute the same

name

positional numbeirng system's valid value range from 0-7, 10-17, 20-27, etc

octal

Option buttons are sometimes called

radio buttons

A valid color definition method in CSS

rgb(200,100,50) hsl(38,40%,20%) #99CCDD

JQuery is tailored for selecting HTML elements to perform an action, as a result___ are the most important part of jQuery

selectors

Which input type creates a field that is not viewable on the form?

type="hidden"

When naming variables, these are valid: var message; var_9; varfive5s; BUT

var#343489;

What are three looping constructs in JavaScript

while, do/while, for


Conjuntos de estudio relacionados

Markedet for sundhed - Fuldkommen konkurrence

View Set

ESPM C46 Midterm 2 Practice Questions

View Set