• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/18

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

18 Cards in this Set

  • Front
  • Back
Describe two differences between java and javascript
Java is a compiled lanagauge: javascript is intrepretated langauge. Java a VM or intreperter to run a APPLET JavaScript requires a browser
Within what element should be placed your javascript code?
script
Why should you place your Javascript code within your HTML comment tag?
To prevent older browsers that do not support Javascript from displaying the Javascripts commands on the web page.
Why should you enclose an embedded script within a CDATA section? What is the problem?
Character symbols such as "<" ">" and "&" are often used in JavaScript programs.
What JavaScript command writes the text "Avalon Pages" marked as an h1 heading to your Web Pages?
document.write<h1>Avalon Books</h1>");
What are four variable types supported by javascript?
1. Numbers
2. String
3. Boolean
4. Null values
What JavaScript command stores the current date in variable named "Now"?
var Now = new Date();
What javascript command extracts the current day of the month from the Now Variable , storing it in a variable named "tdate".
var Tdate=Now.getDate();
if the current month is sept what is the value returned by the getMonth() method?
8
Provide the general syntax of a Javascript function
function function_name(parameters) {
javascript commands
}
What Javascript command calls the function, "calcMort" using the variables: loan,interest, and period as the parameters values and storing the resulting value in variable named "mortgage"?
var mortgage=calcMort(loan, interest, period);
What javascript code displays the text "welcome back!" if the value of the MonthName variable is September"?
If (MonthName == "semptember") {
document.write("Welcome Back! ");
}
What javascript code displays welcome back! If MonthName equals "September", or the text "Today's Headlines" if the month is september?
if (MonthName == "september") {
document.write("Welcome back !");
}else{
document.write("Todays Headlines);
What javascript code displays welcome back! If MonthName equals "September", "Summers Here" if the month name equals june or "todays headlines' for other months?
if (MonthName == "september") {
document.write("Welcome back !");
}else{

if monthName =="June") {
document.write("Summer's here!")
}else{
document.write("Todays Headlines);
}
}
What is an array? What command would you use to create an array named colors?
An array is an ordered collection of values referenced by singles name.
var Colors = new Array();
What javascript command would you enter to place values "RED", "Green", "Blue" , "Black" and "White" into an array named "Colors"?
Var Colors = new Array ("Red"', "Green", "Blue", "Black", "White");
What is a program loop
A program loop is a set of instructions that is executed repeatedly. There are two types of loops: loops that repeat a set of number of times before quitting ( for loops ) and loops that repeast until a certain condition is met ( while Loops.)
What value will counter variable i take the following loop
for (i=5; i<=25; i+=25; i+=5)
5, 10 , 15 , 20 , 25