cist 1520 final
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
You must know which of the following to be able to use JavaScript? | show 🗑
|
||||
Which of the following is something you should have to use JavaScript? | show 🗑
|
||||
show | JavaScript
🗑
|
||||
is the international standard name and specification used for the JavaScript language. | show 🗑
|
||||
show | LiveScript
🗑
|
||||
show | prototype-based
🗑
|
||||
show | It may offer features such as code highlighting, completion, debugging tools, and more.
🗑
|
||||
A language doesn't require a program to be compiled before it is run. | show 🗑
|
||||
show | The client
🗑
|
||||
How is JavaScript added to a Web page? | show 🗑
|
||||
show | False
🗑
|
||||
show | True
🗑
|
||||
A fancy code editor is necessary to edit JavaScript files. | show 🗑
|
||||
show | False
🗑
|
||||
show | <script> and </script> tags
🗑
|
||||
show | All of the above
🗑
|
||||
show | To ensure the Web page validates when using XHTML
🗑
|
||||
Is JavaScript code case sensitive? | show 🗑
|
||||
show | content, JavaScript
🗑
|
||||
An external JavaScript file commonly uses a filename extension of _. | show 🗑
|
||||
show | <script src="yourfile.js"></script>
🗑
|
||||
In HTML, the script tag is not case sensitive. However, with XHTML, the script tag must be in _. | show 🗑
|
||||
The _ signals the end of a JavaScript statement. | show 🗑
|
||||
To write a string of text on a Web page, the _ method can be used. | show 🗑
|
||||
show | When the script is very long or needs to be placed in more than one HTML document.
🗑
|
||||
show | documenting, debugging
🗑
|
||||
Which of the following indicates that a single line of commentary will follow it within JavaScript code? | show 🗑
|
||||
Which of the following indicates that more than one line of commentary will follow it within JavaScript code? | show 🗑
|
||||
show | */
🗑
|
||||
show | Close
🗑
|
||||
A variable represents or holds a ___ | show 🗑
|
||||
show | They can save you time writing and updating your scripts, and they can make the purpose of your code clearer.
🗑
|
||||
show | var
🗑
|
||||
show | =
🗑
|
||||
show | var pagenumber=240;
🗑
|
||||
Variable names are not case sensitive. | show 🗑
|
||||
A variable name must begin with a ____,____,____character. | show 🗑
|
||||
show | TRUE
🗑
|
||||
show | var my_house;
🗑
|
||||
show | number, string, boolean, null, undefined, symbol, and object.
🗑
|
||||
To denote an exponent in JavaScript, you use the letter ___ right after the base number and before the exponent. | show 🗑
|
||||
show | var mytext="Here is some text!';
🗑
|
||||
show | document.write("John said,\"Hi!\"");
🗑
|
||||
____enable you to add things to your strings that could not be added otherwise. | show 🗑
|
||||
Which of the following successfully displays the value of a variable named myhobby by adding it to a string? | show 🗑
|
||||
In general, a ____ is a little script within a larger script that is used to perform a single task or a series of tasks. | show 🗑
|
||||
What are two reasons why a function can be useful? | show 🗑
|
||||
On the first line of a function, ________ whether it accepts any arguments. | show 🗑
|
||||
show | keyword
🗑
|
||||
What surrounds the code inside a function? | show 🗑
|
||||
Function names are case sensitive. | show 🗑
|
||||
JavaScript keywords can be used as a function names. | show 🗑
|
||||
show | function get_text()
🗑
|
||||
Arguments are used to allow a function to import ____ values from somewhere outside the function. | show 🗑
|
||||
Arguments are set on the first line of a function, inside a set of _____ | show 🗑
|
||||
Multiple argyments are separated by what symbol? | show 🗑
|
||||
show | window.alert("This is text");
🗑
|
||||
show | some_alert("some","words");
🗑
|
||||
show | var shopping=get_something();
🗑
|
||||
show | global
🗑
|
||||
The _____ keywords create values in the current block context. | show 🗑
|
||||
_____ is a symbol or word in JavaScript that performs some sort of calculation, comparison, or assignment on one or more values. | show 🗑
|
||||
____ operators are most often used to perform mathematical calculations on two values. | show 🗑
|
||||
show | addition
🗑
|
||||
When the increment operator is placed before the operand,__________, and then the rest of the statement is executed. | show 🗑
|
||||
show | $#
🗑
|
||||
What does an assignment operator do? | show 🗑
|
||||
show | add-and-assign(+=)
🗑
|
||||
show | Compares two values or statements, and returns a valie of true or false.
🗑
|
||||
show | 4 !=3
🗑
|
||||
Which of the following comparisons will return false? | show 🗑
|
||||
show | one or both
🗑
|
||||
Which of the following statements will return true? | show 🗑
|
||||
show | (4 >=4) && (5<=2)
🗑
|
||||
____ operators are logical operators that work at the bit level. | show 🗑
|
||||
In JavaScript, the operators have a certain order of _____. | show 🗑
|
||||
show | getData()
🗑
|
||||
show | event.dataTransfer
🗑
|
||||
The ___ event occurs when an element begins being dragged. | show 🗑
|
||||
show | FALSE
🗑
|
||||
JavaScript ___ may make some advanced coding tasks easier by making the code easier to write. | show 🗑
|
||||
The ____ attribute of an element defines whether or not the element can be dragged. | show 🗑
|
||||
When drawing on a canvas, you can use the fillCircle() method to draw a circle. | show 🗑
|
||||
show | <canvas>
🗑
|
||||
The jQuery library makes it easier to write code that is ____. | show 🗑
|
||||
show | CSS
🗑
|
||||
show | $("#story").hide();
🗑
|
||||
show | $(document).ready()
🗑
|
||||
The acronym for JavaScript Object Notation is ___. | show 🗑
|
||||
show | TRUE
🗑
|
||||
___ stands for Asynchronous JavaScript and XML. | show 🗑
|
||||
What object allows you to get data from the server in JavaScript? | show 🗑
|
||||
Which of the following HTML5 form attributes is used for fields that must be filled in by the user to validate? | show 🗑
|
||||
The ___ method allows you to submit a form without the viewer clicking the submit button. | show 🗑
|
||||
One way to help with form accessibility is to use the ___ tags to identify what field a piece of text is describing. | show 🗑
|
||||
Which of the following would add a valid meter tag to the document to show 8 on a scale of 0 to 10? | show 🗑
|
||||
The ____ method allows you to reset a form using your script. | show 🗑
|
||||
show | pattern
🗑
|
||||
The ___ property is an array that allows you to access each element in a specific form. | show 🗑
|
||||
show | action
🗑
|
||||
show | document.f1.e1.value
🗑
|
||||
Using form ___ or ___ allows you to name the forms on the page that you want to access later. | show 🗑
|
||||
show | document.forms.length
🗑
|
||||
Which of the following would find the number of elements in the third form on a page? | show 🗑
|
||||
Which of the following would access the fourth form on a page? | show 🗑
|
||||
The forms ____ allows you to access a form using an index number. | show 🗑
|
||||
The ____ objects provides properties and methods to get information about string or to modify strings. | show 🗑
|
||||
show | Creating an instance of the String object and creating a string literal
🗑
|
||||
show | literal
🗑
|
||||
show | JavaScript takes the string literal and turns it into a temporary String object
🗑
|
||||
show | Length
🗑
|
||||
show | length
🗑
|
||||
show | var the_text ="Look at me!";
🗑
|
||||
show | charAt()
🗑
|
||||
show | big()
🗑
|
||||
The concat() method ___ two or more string together and returns the new combined string value. | show 🗑
|
||||
Which one of the following statements is true? | show 🗑
|
||||
show | document.cookie
🗑
|
||||
show | toString()
🗑
|
||||
show | form
🗑
|
||||
show | The setInterval() method is used to repeat a function at aset time interval,
while setTimeout() executes a function only once after a set time delay.
🗑
|
||||
show | yes, no, 1, and 0
🗑
|
||||
show | prompt
🗑
|
||||
show | print()
🗑
|
||||
What value is returned by the confirm() method if the viewer clicks the OK button? | show 🗑
|
||||
show | alert()
🗑
|
||||
What is the difference between the parent and top properties? | show 🗑
|
||||
show | Newer browsers do not allow the window status to be changed by default,
so the user would need to change security settings in order for it to work.
🗑
|
||||
show | Self
🗑
|
||||
The calls to properties and methods of the window object can often be shortend because: | show 🗑
|
||||
The ___ property holds the name of the current window and also allows you to give the window a name. | show 🗑
|
||||
show | TRUE
🗑
|
||||
The ____ property returns the number of frames within a window. | show 🗑
|
||||
show | TRUE
🗑
|
||||
A ___ object is created for each browser window | show 🗑
|
||||
show | match()
🗑
|
||||
show | replace()
🗑
|
||||
A _____ loop looks at a comparison and repeats until the comparison is no longer true. | show 🗑
|
||||
show | FALSE
🗑
|
||||
What property of the Array object will return the numeric value of the length of an array? | show 🗑
|
||||
show | bracket
🗑
|
||||
show | CONSTRUCTOR
🗑
|
||||
A(n) _____ of an object can be created using the new keyword. | show 🗑
|
||||
You can only have one instance of an object. | show 🗑
|
||||
show | var weekday=rightnow.getDay();
🗑
|
||||
show | FALSE
🗑
|
||||
show | getDay()
🗑
|
||||
What must be created in most cases before the Date object's properties and methods can be used? | show 🗑
|
||||
show | sqrt()
🗑
|
||||
Which of the following would correctly generate a random number between 0 and 7? | show 🗑
|
||||
The pow() method returns the numeric value of the ____ argument raised to the power of the ____ argument. | show 🗑
|
||||
show | asin()
🗑
|
||||
The abs() method returns the ____ value of a number sent to it as an argument. | show 🗑
|
||||
The ___ property holds the value of the square root of 2. | show 🗑
|
||||
show | document.write(Math.PI);
🗑
|
||||
The LOG10E property holds the value of the logarithm of 10*E | show 🗑
|
||||
show | logarithm
🗑
|
||||
show | E
🗑
|
||||
What do the properties and methods of the Math objects enable you to do? | show 🗑
|
||||
You can use a ___ clause to return only the rows in a table that meet certain criteria. | show 🗑
|
||||
show | FALSE
🗑
|
||||
show | router
🗑
|
||||
The default port used when you type a URL into your Web browser is ____. | show 🗑
|
||||
The ____ module can be used to create a Web server in Node.js. | show 🗑
|
||||
show | *
🗑
|
||||
show | pg
🗑
|
||||
You should always use the superuser account to query your database from your Web application. | show 🗑
|
||||
The ___ stack uses MongoDB, Express, AngulatJS, and NodeJS. | show 🗑
|
||||
One one type of database can be used with Node.js. | show 🗑
|
||||
Which of the following extensions would be used for a custom module? | show 🗑
|
||||
show | custom
🗑
|
||||
Which of the following would require the built-in fs module without an error? | show 🗑
|
||||
Which of the following would run the Node script hello-world.js from the command window? | show 🗑
|
||||
Node.js runs in a Web browser. | show 🗑
|
||||
show | addEventListener() , attachEvent()
🗑
|
||||
show | window.event
🗑
|
||||
The keydown event occurs when a viewer presses down a key on the keyboard. | show 🗑
|
||||
The submit event occurs when the viewer ___ on a Web page. | show 🗑
|
||||
show | type
🗑
|
||||
The ____ object contains properties and methods for an event. | show 🗑
|
||||
show | focus
🗑
|
||||
show | unload
🗑
|
||||
show | FALSE
🗑
|
||||
show | The viewer moves the mouse cursor over an element on the page
🗑
|
||||
show | Load
🗑
|
||||
show | <input type="button" onclick="window.alert('Hey there!');>
🗑
|
||||
To use an event handler, you place it in the ____ or the _____ code. | show 🗑
|
||||
show | access, events
🗑
|
||||
An event handler is a predefined JavaScript property of an object that is used to handle an event on a Web Page. | show 🗑
|
||||
show | document.write() and document.writeln() statements.
🗑
|
||||
show | All the elements that have the same value for the name attribute (most commonly radio buttons).
🗑
|
||||
How does the writeln() method differ from the write() method? | show 🗑
|
||||
Which property return the complete URL of the current document? | show 🗑
|
||||
You can use the title property to display the title of a Web page someplace other than in the top bar of the browser window. | show 🗑
|
||||
show | TRUE
🗑
|
||||
show | lastModified
🗑
|
||||
show | innerHTML
🗑
|
||||
show | ANCHORS
🗑
|
||||
You cannot remove nodes from the document once they have been added. | show 🗑
|
||||
show | FALSE
🗑
|
||||
The _____ method of the document object allows you to get an element by the value of its id attribute. | show 🗑
|
||||
You can use the DOM node property style to alter the style sheet attributes of an element. | show 🗑
|
||||
show | REFERRER
🗑
|
||||
The _______ object is an object that is created by the browser for each new HTML page that is viewed. | show 🗑
|
||||
show | appType
🗑
|
||||
The _____ object gives you access to the various properties of the viewer's browser. | show 🗑
|
||||
In JavaScript, there are many ____ objects you can use to gain access to certain properties and methods you may need. | show 🗑
|
||||
assuming the myhouse object exists, the kitchen property is assigned a new string value of :big: or is initialized with the value "big". | show 🗑
|
||||
Which of the following would send an alert to the viewer that tells the name of the browser being used? | show 🗑
|
||||
If a property cannot be found in the object instance, JavaScript will look in the object's _________. | show 🗑
|
||||
show | Assuming the myhouse object exists, it assigns the value of the kitchen property of the myhouse object to the variable x.
🗑
|
||||
show | dot operator (.)
🗑
|
||||
show | TRUE
🗑
|
||||
show | CONSTRUCTOR
🗑
|
||||
An object is a collection of _______ and _______. | show 🗑
|
||||
show | TRUE
🗑
|
||||
Which of the following would be valid as the first line of an if/else statement? | show 🗑
|
||||
show | while (x=7)
🗑
|
||||
Which of these would be valid as the first line of a for loop? | show 🗑
|
||||
A loop is useful because it forces you to type lines of code repeatedly. | show 🗑
|
||||
A do while loop is special because the code within the loop is performed at least once, even if the comparison used would return false the first time. | show 🗑
|
||||
show | FALSE
🗑
|
||||
show | As many times as you like (through enough nesting could make the browser run out of memory)
🗑
|
||||
show | array
🗑
|
||||
show | it sorts the content using string character codes
🗑
|
||||
show | pop()
🗑
|
||||
___ arrays provide the ability to create arrays of more than one dimension. | show 🗑
|
||||
show | join()
🗑
|
||||
show | concat()
🗑
|
||||
What does the following code do? let s_list = new Array(5); | show 🗑
|
||||
Which of the following does not correctly create an array? | show 🗑
|
||||
You can use JavaScript keywords as array names. | show 🗑
|
||||
In JavaScript, there are ____ ways to define an array. | show 🗑
|
||||
A ____ is a block of code that allows you to repeat a section of code certain number of times. | show 🗑
|
||||
You can use a ___ to cycle through all of the items in an array. | show 🗑
|
||||
The ___ statement allows you to take a single variable value and execute a different line of code based on the value of the variable. | show 🗑
|
||||
You can think of a conditional statement as being a little like _____. | show 🗑
|
||||
What do you use to enclose the blocks of code in conditionals and loops? | show 🗑
|
||||
show | index
🗑
|
||||
Array literal notation allows you to create an array using square brackets, without the need to write out "____". | show 🗑
|
||||
A conditional statement is a statement that you can use to ____________, or do something else if that condition is not met. | show 🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
evetay
Popular Computers sets