JavaScript Fundamentals
Complete List of Terms and Definitions for JavaScript Fundamentals
| Terms | Definitions |
|---|---|
| onMouseOver | link, area |
| form | onSubmit, onReset |
| True or False:Regular expressions provide a mechanism whereby programmers can search for specified patterns in text | True |
| onFocus | Radio, Checkbox, text, textarea, select |
| Boolean | True or false values only |
| Window Object | -highest-level object-represents the frame of the browser and the mechanisms associated with it. |
| Object | a reference to a JavaScript object |
| True or False:the string object provides predefined methods for formatting text. | True |
| True or False: Arguments or paremeters, are values passed into a function from outside the function. | True |
| What are the commonly used properties,methods and event handlers related to the text and textarea objects? | defaultValue-blur()-onBlurform--onChangename-focus()-onFocusvalue-select()-onSelect |
| parseFloat() | converts a string to its floating-point decimal equivalent |
| password | a single-line text box that displays input as asterisks (***) to mask data entry. |
| reset | a reset button used torestore default values in form elements. |
| Does the Math object hold a value? | no |
| How big can a cookie be? | 4 kilobytes |
| Variable Data Types | Number, string, Boolean, null, Object |
| What is the main event handler associated with the checkbox object. | onClick |
| Argument | A value or expression containing data or code that is passed on to a function or procedure. |
| button | scriptable button other than a Submit or Reset button |
| Operator:== | Evaluates to true if the operands are equal. |
| Operator: -= | Subtracts the right operand from the left operand and assigns the result to the left operand. |
| Operator:%= | Divides the left operand by the right operand and assigns th remainder to the left operand. |
| submit | a submit button used to send the contents of a form to a server. |
| textarea | a scrolling text box used for data entry. |
| "A more efficient method for evaluating a large number of test conditions | the "switch" statement |
| select | a selection list from which a single choice or multiple choices can be made |
| What is the String expression | evaluates to a string |
| Opeator: - (unary) | Negates the value of the operand. |
| Operator: | Evaluates to true if the left operand is greater than or equal to the right operand. |
| How do you exit the "switch" statement? | the "break" statement. |
| Event: focus | Occurs when a user gives input or focus to a form element. |
| Event: submit | Occurs when a form's Submit button is clicked. |
| What is an array? | a single variable with multiple "slots" for different values. |
| Event: mouseOver | Occurs when the user moves the mouse pointer over a link or area object. |
| Functions | A named block of code that can be called when needed. Can return a value. |
| Operator: > | Evaluates to true if the left operand is less than the right operand. |
| Operator: % | Divides the left operand by the right operand and calculates the remainder. |
| Operator: ++ | Increases t he value of the supplied operand by one. |
| What statement returns values to the calling statement. | The return statement |
| What is the String Expression? |
Evaluates to a string. Exp. "Hello, " + "Sandy"; This evaluates to a new string that says "Hello, Sandy". Operator is + (concatenation). |
| What is an Event Handler? | A JavaScript mechanism for intercepting an event and associating exectable code with that event. |
| What is the name of the object used to invoke regular expressions? | RegExp |
| What method allows you to examine and extract a portion of a string? | the substring() method. |
| What is the syntax for a function? | function functionName (argument1, argument2,...){//statements here} |
| What is the most common element in any program? | The string |
| Event: load | Occurs when a page is loaded into the browser. |
| What are Operators? | Used in expressions to store or return a value. |
| if...else statement | gives the ability to branch to one of two processes depending on the result of some test condition that you have scripted. |
| What is a argument? | A value or expression containing data or code that is passed on to a function or procedure. |
| What is Concatenation? |
Synthesis of code to simplify it and reduce duplication; linking two or more units of information such as strings or file, to form one unit. exp. alert("Begin message " + prompt("Message to user", "default text") + " End message."); |
| True or False:the form object represents the an A++ form in JavaScript | False:the form object represents an HTML form in JavaScript |
| True or False:the document object is defined in the HEAD of the HTML page. | False:defined in the BODY tag |
| Rules for naming variables | 1.first character must be a letter or underscore2.subsequent characters can be letters numbers, and/or unerscore |
| What is "for" statement? | It repeats a group of statements for some particular range of values. |
| What is the Arithmetic Expression? |
Evaluates to a number. Exp. 25 + 75; This expression evaluates to the sum of 25 and 75. Operator is + (addition). |
| What is the confirm() method |
* Similar to Alert() * Returns either True or False |
| What is the Logical Expression? |
Evaluates to true or false. exp. 25 > 75; Becuase 25 is less than 75, this expression evaluates to the Boolean value of true. Operator is < (less than comparison). |
| What is the Assignment Expression? |
Assigns a value to a variable. Exp. myNumber = 25; The value 25 has been assigned to the varible nyNumber. Operator is = (assignment). |
| What is the generic syntax for a cookie? | document.cookie = "name = value"; |
| Operator: (condition) ? val1 : val2 | evaluates to one of two different values based on a condition. |
| What do you statement is made to use several properties and/or methods with a single object? | the "the" with statement. |
| How do you define a function? | When you encompass agroup of script statements into a function block. |
| What is the prompt() Method |
* Requests user input throught a text field within a dialog box. * Window Object |
| What is a Statement? | A single line of code to be executed in a script or program. |
| What string objects methods are used with regular expressions and what do they do? | split()-splits a string and returns an array of subsringsreplace()- replaces a string textsearch()-searches a string of text and returns the index position of a string.match()-returns an array of matched text instead of an index position. |
| What are some common Array object methods? | join()-creates a string of an array's valuereverse()-used to reverse the order of an array's elements.sort()-arranges the leements of an array in a particular order |
| What are the special characters for string object and what do the do? | \b backspace\f form feed\n new line\r carriage return\t tab\" double quotation mark\' single quotation mark\\backslash |
| Concerning cookies; What two actions occur when a user generates an HTTP request? | 1. any cookies already on the client's system that match the server's domain can be passed along in the request header.2. a server can send a cookie back in the HTTP response header. |
| What are the properties of the "image" object? | src, height and width, length, lowsrc, complete, hspace and vspace. |
| What are you targeting when you target the parent frame? | the file containing the frameset in which the currently selected frame is defined. |
| How do you change any combination of frames at any time? | Write a simple function that includes two or more location.href statements. |
| Why would you invoke a lastindexOf() method? | In case you wanted to return the starting position of the LAST occurrence of the search text |
| what is the select object? | It is a drop-down list or list box of items used in an HTML form. |
| True or False: The "continue" statement can be used in an "if...else" statement. | FalseIt can only be used inside a "for" or "while" loop. |
| True or False:Each form on a page is representd by a one all encompassing instance of the form object. | False:each form on a page is represented by a seperate instance of the form object. |
| True or False:you can use date and time information through the Array object. | False:the only way to use date and time information in JavaScript is through the Date object. |
| When would you want to use the charAt()method? | When you want to extract a character that occurs at a specific position in a string. |
| Do you need to create a formal string object to use string object properties? | No, javascript is flexible in this regard. |
| What two ways can you target frames in JavaScript | 1. By target name2. By the frame's number in the frames array. |
| What is a while statement used for? | To execute a block of code for as long as a certain test condtion is true. |