Professional Documents
Culture Documents
Finals - Attempt Review4 PDF
Finals - Attempt Review4 PDF
b. Square brackets - []
c. Curly brackets - {}
d. Nothing
Question 2 It is a function in the PHP that check whether the variable has been set.
Correct
b. date()
c. isset()
d. strtoupper()
b. $_GET
c. $_POST
d. ISSET()
c. Tim Berners-Lee
d. Bill Gates
Question 7 Which of the following correctly calls a function named major_alert() inside the onfocus event handler?
Incorrect
Question 8 Which of the following correctly calls a function named some_alert () and sends it two string values as
Correct parameters?
Mark 1.00 out of
1.00 Select one:
a. some_alert("some","words);
b. some_alert("some","words");
d. some_alert ();
Question 9 Variable names are not case sensitive.
Correct
b. False
b. function
c. var
Question 11 This is the command to display the value stored in the variable.
Correct
b. cout>>
c. Display
d. Echo
Question 13 How many times can you nest a code block within another?
Correct
c. As many times as you like (though enough nesting could run the browser out of memory)
d. Once
Question 14 Which of the following correctly points to an external JavaScript file named yourfile.js?
Correct
d. <script language="yourfile.js"></script>
Question 16 It is a function in the PHP that get the date of the server.
Correct
c. date()
d. strtoupper()
b. server-side language
c. object deficient
d. Object based
Question 18 What is the result of the script below?
Correct <script>
Mark 1.00 out of var n = ["Maria", "Isabella", "Georgina"];
1.00 var new_n = n.pop();
document.write(new_n);
</script>
Select one:
a. Maria
b. Isabella
c. Georgina
Question 19 In JavaScript, you access object properties through the use of the
Correct
c. addition operator
b. $Flowers = [];
c. print_r($Flowers);
Question 21 Which of the following would correctly write the value of pi on a Web page?
Correct
c. document.write(Math.Pi);
d. document.write(Math.pi);
Question 22 What is the result of the script below?
Correct
<script>
Mark 1.00 out of
var x = 0;
1.00
var e = "gsbatingggl.x";
var domain = "";
for(var ctr = 0; ctr < e.length; ctr++)
{
if(e[ctr] == "@")
{
domain = e.substring(ctr);
if((domain == "@yahoo.com.ph") ||
(domain == "@yahoo.com") ||
(domain == "@edu.gov"))
{
x++1;
}
}
}
document.write(x);
</script>
Select one:
a. 12
c. 0
d. 1
Question 23 Which of the following would be valid as the first line of an if/else statement?
Correct
b. if (x=2)
c. link
d. frame
Question 25 What is the result of the script below?
Correct <script>
Mark 1.00 out of var greeting;
1.00 var time = 10;
if (time < 10) {
greeting = "Good morning";
} else if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
document.write(greeting);
</script>
Select one:
a. Good evening
b. Good day
c. Good morning
Question 27 You should avoid using JavaScript reserved words as variable names.
Incorrect
b. False
Question 28 In a regular array, access to an element is usually through the use of a(n) __________.
Correct
b. random number
c. string
Select one:
a. JAVA
b. PHP
c. CSS
Question 30 Why should you use the type attribute in the opening script tag?
Correct
Question 31 The external JavaScript file must contain the <script> tag.
Correct
b. False
Question 32 A mouseout event occurs when a viewer clicks an element on the page.
Correct
b. False
b. 4!=3
c. 4<=3
server-side
scripting
b. True
b. Java
c. LiveScript
d. Mocha
c. object properties
d. object method
Question 38 To write a string of text on a Web page, the _________ method is used.
Correct
b. window.print()
c. document,type()
b. True
Question 40 Which of the following successfully prints a variable named myhobby by adding it to a set of strings?
Correct
Question 41 The getMonth() method returns the same number as the number that represents the current month (for
Correct example, returns 1 if the current month is January).
Mark 1.00 out of
1.00 Select one:
a. False
b. True
b. .jav
c. .html
d. .js
Question 43 JavaScript is a language that must be compiled while Java is a language that must be interpreted.
Correct
b. False
b. JavaScript Interpreter
c. JavaScript Compiler
c. 4==3
d. 4<3
b. public_html
c. htdocs
d. \\AMA-PC1\user
Question 47 Part of the web browser that understands HTML and CSS.
Correct
b. Rendering Engine
d. JavaScript Compiler
Question 48 The script tag's attribute that tells the browser the language of the script.
Correct
b. id
c. src
Question 49 Which of the following would be valid as the first line of an if/else statement?
Correct
d. if (y ! 7)
b. document.write(color.blue)
c. document.fgcolor = blue
d. window.bgcolor = blue
◄ Quiz 006 Jump to...