KEMBAR78
Answerss Web System | PDF | Dynamic Web Page | Java Script
0% found this document useful (0 votes)
125 views61 pages

Answerss Web System

The document contains 11 multiple choice questions about JavaScript and other programming languages. The questions cover topics like the original name of JavaScript, what tag attributes and elements are used to include JavaScript code in an HTML document, whether JavaScript is case sensitive, and other basic JavaScript concepts.

Uploaded by

Jesse Jaucian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views61 pages

Answerss Web System

The document contains 11 multiple choice questions about JavaScript and other programming languages. The questions cover topics like the original name of JavaScript, what tag attributes and elements are used to include JavaScript code in an HTML document, whether JavaScript is case sensitive, and other basic JavaScript concepts.

Uploaded by

Jesse Jaucian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 61

What is the original name of JavaScript?

Select one:
a.
None of the choices
b.
Java
c.
Mocha
d.
LiveScript
Clear my choice

Question 2
Not yet answered
Marked out of 1

Flag question

Question text
The script tag's attribute that tells the browser the language of the script.

Select one:
a.
None of the choices
b.
src
c.
id
d.
type
Clear my choice

Question 3
Not yet answered
Marked out of 1
Flag question

Question text
Which of the following is something you should have to use the JavaScript?

Select one:
a.
None of the choices
b.
C++ compiler
c.
Web browser
d.
50GB hard drive
Clear my choice

Question 4
Not yet answered
Marked out of 1

Flag question

Question text
JavaScript is _________.

Select one:
a.
object deficient
b.
server-side language
c.
None of the choices
d.
Object based
Clear my choice

Question 5
Not yet answered
Marked out of 1

Flag question

Question text
Is JavaScript code case sensitive?

Select one:
a.
No
b.
Yes
Clear my choice

Question 6
Not yet answered
Marked out of 1

Flag question

Question text
The _______ signals the end of a JavaScript statement.

Select one:
a.
None of the choices
b.
period
c.
colon
Clear my choice
Question 7
Not yet answered
Marked out of 1

Flag question

Question text
Which of the following language is used to program the behavior of web pages?

Select one:
a.
CSS
b.
HTML
c.
None of the choices
d.
Java
Clear my choice

Question 8
Not yet answered
Marked out of 1

Flag question

Question text
The choice of a Web browser is up to you, as long it's compatible with _________.

Select one:
a.
VBScript
b.
Flash MX
c.
None of the choices
d.
JavaScript
Clear my choice

Question 9
Not yet answered
Marked out of 1

Flag question

Question text
What is the purpose of the <script> and </script> tags? 

Select one:
a.
To point to an external JavaScript file

b.
All of the choices

c.
To tell the browser where a script begins and ends

d.
To let the browser know the scripting language to be used

Clear my choice

Question 10
Not yet answered
Marked out of 1

Flag question

Question text
Active scripting is not a programing language instead it is a plain text interpreted to make a
dynamic and interactive web pages.
Select one:
a.
False
b.
True

Question 1
Complete
Mark 1 out of 1

Flag question

Question text
Who developed the JavaScript?

Select one:
a.
Bill Gates
b.
Tim Berners-Lee
c.
Dennis Ritchie
d.
None of the choices

Question 2
Complete
Mark 1 out of 1

Flag question

Question text
JavaScript is a _________ language that doesn't require a program to be compiled before it is
run.

Select one:
programming

server-side

scripting

None of the choices


Feedback
Your answer is correct.

Question 3
Complete
Mark 1 out of 1

Flag question

Question text
An external JavaScript file commonly uses a filename extension of _______.

Select one:
a.
None of the choices
b.
.js
c.
.jav
d.
.html

Question 4
Complete
Mark 1 out of 1
Flag question

Question text
Part of the browser that understands JavaScript.

Select one:
a.
None of the choices
b.
JavaScript Compiler
c.
JavaScript Interpreter
d.
Rendering Engine

Question 5
Complete
Mark 1 out of 1

Flag question

Question text
JavaScript is a language that must be compiled while Java is a language that must be
interpreted.

Select one:
a.
True
b.
False

Question 6
Complete
Mark 0 out of 1
Flag question

Question text
Why should you use the type attribute in the opening script tag?

Select one:
a.
To create a typing script
b.
To let the browser know what type of coder you are
c.
To be sure the browser does not interpret your JavaScript as another scripting language and
to ensure the Web page validates in XHTML
d.
None of the choices

Question 7
Complete
Mark 1 out of 1

Flag question

Question text
When would it be a good idea to use an external JavaScript file?

Select one:
a.
When your Web site viewers have older browsers
b.
When the script is very long or needs to be placed in more than one HTML document
c.
None of the choices
d.
When the script is short or going to be used in only one HTML document
Question 8
Complete
Mark 1 out of 1

Flag question

Question text
JavaScript has similarities to other programming and scripting languages.

Select one:
a.
True
b.
False

Question 9
Complete
Mark 0 out of 1

Flag question

Question text
Part of the web browser that understands HTML and CSS.

Select one:
a.
JavaScript Interpreter
b.
JavaScript Compiler
c.
None of the choices
d.
Rendering Engine

Question 10
Complete
Mark 1 out of 1
Flag question

Question text
Which of the following correctly points to an external JavaScript file named yourfile.js? 

Select one:
a.
None of the choices

b.
<script language="yourfile.js"></script>

c.
<script type="text/javascript" link="yourfile.js"></script>

d.
<script type= "text/javascript" src="yourfile.js"></script>
Feedback
Your answer is correct.

Question 1
Not yet answered

Marked out of 1.00

Flag question

Question text
What is the purpose of the <script> and </script> tags? 
Select one:

a.

To let the browser know the scripting language to be used

b.
To point to an external JavaScript file

c.

All of the choices

d.

To tell the browser where a script begins and ends

Clear my choice

Question 2
Not yet answered

Marked out of 1.00

Flag question

Question text
In the process of PHP which what is the missing step?

1st: The client browser sends a request to the Web Server


2nd: The Webserver will simply respond to the client if the page consist of HTML, CSS,
Images and Javascript. However, if the there is a PHP in the webpage, it will proceed to the
3rd step.
3rd: x x x x
4th: If there is a database involve the PHP engine will send the file to the database for
processing.
5th: After the database have processed the file it will then return it to the PHP engine and
the PHP Engine will return it to the web server. The web server is the one responsible for
sending it back to the client browser.
Select one:

a.

None of the choices

b.
The Webserver will then interpret the PHP Webpage and send it back to the Database.

c.

The Webserver will then interpret the PHP Webpage and send it back to the Database.

d.

The Webserver will send the PHP webpage to the PHP Engine for processing.

Clear my choice

Question 3
Not yet answered

Marked out of 1.00

Flag question

Question text
This is the command to display the value stored in the variable.
Select one:

a.

None of the choices

b.

cout>>

c.

Display

d.

Echo

Clear my choice

Question 4
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following is not a commenting style?
Select one:

a.

 %                   %

b.

c.

/*                 */

d.

 //

Clear my choice

Question 5
Not yet answered

Marked out of 1.00

Flag question

Question text
JavaScript is _________.
Select one:

a.

object deficient

b.

server-side language

c.

Object based

d.

None of the choices

Clear my choice

Question 6
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following language is used to program the behavior of web pages?

Select one:

a.

CSS

b.

None of the choices


c.

HTML

d.

Java

Clear my choice

Question 7
Not yet answered

Marked out of 1.00

Flag question

Question text
Part of the browser that understands JavaScript.

Select one:

a.

Rendering Engine

b.

JavaScript Interpreter

c.

None of the choices

d.

JavaScript Compiler

Clear my choice
Question 8
Not yet answered

Marked out of 1.00

Flag question

Question text
JavaScript is a language that must be compiled while Java is a language that must be
interpreted.

Select one:

a.

True

b.

False

Clear my choice

Question 9
Not yet answered

Marked out of 1.00

Flag question

Question text
JavaScript has similarities to other programming and scripting languages.

Select one:

a.
False

b.

True

Clear my choice

Question 10
Not yet answered

Marked out of 1.00

Flag question

Question text
It is a server side scripting language that is designed to be embedded because it is mixed in
the HTML Markup. This Language can process and email contact forms, upload & file from
online forms, generate thumbnails for large images, watermark images, read and write files
and communicate with a database.
Select one:

a.

JAVA

b.

PHP

c.

CSS

d.

None of the choices

Clear my choice
Question 11
Not yet answered

Marked out of 1.00

Flag question

Question text
This are statements that performs repetitive tasks.
Select one:

a.

Loops

b.

Conditional Statement

c.

Variable

d.

Functions

Clear my choice

Question 12
Not yet answered

Marked out of 1.00

Flag question

Question text
It holds multiple values.
Select one:

a.

Functions

b.

Arrays

c.

Loops

d.

Variable

Clear my choice

Question 13
Not yet answered

Marked out of 1.00

Flag question

Question text
JavaScript is a _________ language that doesn't require a program to be compiled before it is
run.
Select one:

programming

server-side
scripting

None of the choices

Clear my choice

Question 14
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following does not belong to the group?
Select one:

a.

public_html

b.

\\AMA-PC1\user

c.

htdocs

d.

www

Clear my choice

Question 15
Not yet answered
Marked out of 1.00

Flag question

Question text
It acts as the placeholder for unknown or changing values.
Select one:

a.

Variable

b.

Arrays

c.

Functions

d.

Loops

Clear my choice

Question 16
Not yet answered

Marked out of 1.00

Flag question

Question text
The choice of a Web browser is up to you, as long it's compatible with _________.

Select one:
a.

Flash MX

b.

JavaScript

c.

VBScript

d.

None of the choices

Clear my choice

Question 17
Not yet answered

Marked out of 1.00

Flag question

Question text
The _______ signals the end of a JavaScript statement.

Select one:

a.

None of the choices

b.

colon

c.
period

Clear my choice

Question 18
Not yet answered

Marked out of 1.00

Flag question

Question text
This are statements that make decision.
Select one:

a.

Functions

b.

Loops

c.

Conditional Statement

d.

Variable

Clear my choice

Question 19
Not yet answered

Marked out of 1.00


Flag question

Question text
Which of the following is a Free PHP Editor?
Select one:

a.

PhpED

b.

Dreamweaver

c.

Zend Studio

d.

Komodo Edit

Clear my choice

Question 20
Not yet answered

Marked out of 1.00

Flag question

Question text
An external JavaScript file commonly uses a filename extension of _______.

Select one:

a.
.html

b.

.jav

c.

.js

d.

None of the choices

Clear my choice

Question 21
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following is not recommended feature in choosing a script editor?
Select one:

a.

None of the Choices

b.

 The Script Editor should have Syntax checking

c.

 The Script Editor should have Line numbering

d.
 The Script Editor should have Syntax checking

Clear my choice

Question 22
Not yet answered

Marked out of 1.00

Flag question

Question text
What is the original name of JavaScript?

Select one:

a.

None of the choices

b.

Java

c.

Mocha

d.

LiveScript

Clear my choice

Question 23
Not yet answered

Marked out of 1.00


Flag question

Question text
Is JavaScript code case sensitive?

Select one:

a.

Yes

b.

No

Clear my choice

Question 24
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following correctly points to an external JavaScript file named yourfile.js? 
Select one:

a.

<script type= "text/javascript" src="yourfile.js"></script>

b.

None of the choices


c.

<script language="yourfile.js"></script>

d.

<script type="text/javascript" link="yourfile.js"></script>

Clear my choice

Question 25
Not yet answered

Marked out of 1.00

Flag question

Question text
Who developed the JavaScript?

Select one:

a.

Dennis Ritchie

b.

None of the choices

c.

Bill Gates

d.

Tim Berners-Lee

Clear my choice
Question 26
Not yet answered

Marked out of 1.00

Flag question

Question text
Why should you use the type attribute in the opening script tag?

Select one:

a.

To create a typing script

b.

To let the browser know what type of coder you are

c.

None of the choices

d.

To be sure the browser does not interpret your JavaScript as another scripting language and
to ensure the Web page validates in XHTML

Clear my choice

Question 27
Not yet answered

Marked out of 1.00


Flag question

Question text
When would it be a good idea to use an external JavaScript file?

Select one:

a.

When the script is very long or needs to be placed in more than one HTML document

b.

When the script is short or going to be used in only one HTML document

c.

When your Web site viewers have older browsers

d.

None of the choices

Clear my choice

Question 28
Not yet answered

Marked out of 1.00

Flag question

Question text
This are statement that performs preset of tasks.
Select one:
a.

Functions

b.

Conditional Statement

c.

Loops

d.

Variable

Clear my choice

Question 29
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following is something you should have to use the JavaScript?

Select one:

a.

50GB hard drive

b.

None of the choices

c.

C++ compiler
d.

Web browser

Clear my choice

Question 30
Not yet answered

Marked out of 1.00

Flag question

Question text
Which of the following is the open and closing tags of PHP?
Select one:

a.

<?php     ?>

b.

<?        /php>

c.

None of the Choices

d.

<?php    /?>

Question 1
Complete

Mark 1 out of 1
Flag question

Question text
Which of the following variable declarations uses a variable with a valid variable name in
JavaScript?

Select one:

a.

None of the choices

b.

var my dog;

c.

var 2cats;

d.

var default;

Question 2
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following statements would be valid in JavaScript?

Select one:
a.

document.write('John said, "Hi!"");

b.

document.write("John said, \"Hi!\"");

c.

document.write("John said, "Hi!"");

d.

None of the choices

Question 3
Complete

Mark 1 out of 1

Flag question

Question text
It is a function in the PHP that converts the string into Upper case.
Select one:

a.

None of the Choices

b.

date()

c.

array()

d.
strtoupper()
Feedback
Your answer is correct.

Question 4
Complete

Mark 1 out of 1

Flag question

Question text
It is a function in the PHP that check whether the variable has been set.
Select one:

a.

strtoupper()

b.

None of the Choices

c.

isset()

d.

date()
Feedback
Your answer is correct.

Question 5
Complete

Mark 1 out of 1
Flag question

Question text
Which of the following is not an include statement?
Select one:

a.

<?php include 'include/external.php'; ?>

b.

<?php include_once 'include/external.php'; ?>

c.

<?php include_all 'include/external.php' ?>

d.

<?php require 'include/external.php'; ?>


Feedback
Your answer is correct.

Question 6
Complete

Mark 1 out of 1

Flag question

Question text
To write a string of text on a Web page, the _________ method is used.

Select one:
a.

document.print()

b.

window.print()

c.

document,type()

d.

None of the choices

Question 7
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following is a valid use of the window.alert() method?

Select one:

a.

None of the choices

b.

win.alt("This is text");

c.

window.alert("This is text);
d.

window.alert('This is text");

Question 8
Complete

Mark 1 out of 1

Flag question

Question text
Variable names are not case sensitive.

Select one:

a.

True

b.

False

Question 9
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following string declarations is invalid?

Select one:

a.
var mytext=‘Here is some text!’;

b.

var mytext=“Here is some text!”;

c.

None of the choices

d.

var mytext= “Here is \n some text!”;

Question 10
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following declares a variable named pagenumber and gives it a value of 240?

Select one:

a.

var pagenumber=240;

b.

pagenumber=220;

c.

var PageNumber=240;

d.
None of the choices

Question 1
Complete

Mark 1 out of 1

Flag question

Question text
Each object in JavaScript has properties associated with it.

Select one:

a.

False

b.

True

Question 2
Complete

Mark 2 out of 2

Flag question

Question text
Is use to change the color of the web page to blue.

Select one:

a.

document.fgcolor = blue
b.

window.bgcolor = blue

c.

document.write(color.blue)

d.

None of the above

Question 3
Complete

Mark 2 out of 2

Flag question

Question text
Is an object collection for all internal frames in the document.

Select one:

a.

document.plugins

b.

None of the choices

c.

document.form.elements

d.

document.frames
Question 4
Complete

Mark 1 out of 1

Flag question

Question text
All object collections are supported by all browsers or browser versions.

Select one:

a.

True

b.

False

Question 5
Complete

Mark 1 out of 1

Flag question

Question text
Is a property use to display document within the frame.

Select one:

a.

method

b.
name

c.

None of the choices

d.

document

Question 6
Complete

Mark 1 out of 1

Flag question

Question text
In JavaScript, you access object properties through the use of the

Select one:

a.

None of the choices

b.

addition operator

c.

You can't access the properties of an object

d.

multiplication operator

Question 7
Complete
Mark 1 out of 1

Flag question

Question text
Which of the following is not a JavaScript object?

Select one:

a.

window

b.

link

c.

None of the choices

d.

frame

Question 8
Complete

Mark 1 out of 1

Flag question

Question text
Refers to an array of all objects of a particular type.

Select one:
a.

None of the choices

b.

object method

c.

object properties

d.

object collection

Question 1
Complete

Mark 1 out of 1

Flag question

Question text
What does a comparison operator do?

Select one:

a.

Deals with bits and is not important right now

b.

None of the choices

c.

Performs a mathematical calculation


d.

Compares two values or statements, and returns a value of true or false

Question 2
Complete

Mark 1 out of 1

Flag question

Question text
If str = "Jose, Enrique, Vicente" and res = str.slice(15,22), what will be the resulting value of
res?

Select one:

a.

Vicente

b.

,Vicent

c.

Enrique

d.

None of the choices

Question 3
Complete

Mark 1 out of 1
Flag question

Question text
Which of the following is not a JavaScript operator?
Select one:

a.

b.

None of the choices

c.

==

d.

&&
Feedback
Your answer is correct.

Question 4
Complete

Mark 0 out of 1

Flag question

Question text
What is the output of the script below? 
<script>
var str = "HELLO WORLD";
document.write(str.charAt(1));
</script>
Select one:

a.

b.

c.

None of the choices

d.

69 
Feedback
Your answer is incorrect.

Question 5
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following correctly assigns the day of the week for an instance of the Date
object named rightnow to a variable named weekday?

Select one:

a.

None of the above

b.
var rightnow= weekday.getDay();

c.

var weekday= rightnow.getDate();

d.

var weekday= right now.getDay();

Question 6
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following comparisons will return false?
Select one:

a.

4!=3

b.

None of the choices

c.

4<=3

d.

3==3
Feedback
Your answer is correct.

Question 7
Complete

Mark 1 out of 1

Flag question

Question text
The getMonth() method returns the same number as the number that represents the
current month (for example, returns 1 if the current month is January).

Select one:

a.

True

b.

False

Question 8
Complete

Mark 1 out of 1

Flag question

Question text
If a = 5 and b = a++ + 10 * 3, what is the value of y?
Select one:

a.

36

b.
45

c.

35

d.

None of the choices


Feedback
Your answer is correct.

Question 9
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following would correctly write the value of pi on a Web page?

Select one:

a.

document.write(Math.Pi);

b.

None of the choices

c.

document.write(Math.PI);

d.

document.write(Math.pi);
Question 10
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following statements will return false?
Select one:

a.

(4>=4)&&(5<=2)

b.

(“a”==“a”)&&(“c”!=“d”)

c.

!(3<=1)

d.

None of the choices


What is the result of the script below?
<script>
var greeting;
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

d.

None of the choices


Feedback
Your answer is incorrect.

Question 2
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following would be valid as the first line of an if/else statement?
Select one:

a.

if (x==2) && (y > x) 

b.

if (x=2)

c.
None of the choices

d.

if (y ! 7)
Feedback
Your answer is correct.

Question 3
Complete

Mark 1 out of 1

Flag question

Question text
What is the result of the script below?
<script>
var n = ["Maria", "Isabella", "Georgina"];
var new_n = n.pop();
document.write(new_n);
</script>
Select one:

a.

Georgina

b.

None of the choices

c.

Isabella

d.

Maria
Feedback
Your answer is correct.

Question 4
Complete

Mark 1 out of 1

Flag question

Question text
Rather than executing every single line of code within the script, a conditional statement
allows certain sections of the script to be executed only when a particular condition is met.

Select one:

a.

True

b.

False

Question 5
Complete

Mark 1 out of 1

Flag question

Question text
How many times can you nest a code block within another?

Select one:

a.
None

b.

As many times as you like (though enough nesting could run the browser out of memory)

c.

Once

d.

None of the above

Question 6
Complete

Mark 1 out of 1

Flag question

Question text
What do you use to enclose the blocks of code in conditionals and loops?

Select one:

a.

None of the choices

b.

Parentheses

c.

Square brackets

d.
Curly brackets

Question 7
Complete

Mark 1 out of 1

Flag question

Question text
What is the result of the script below? 
<script>
var x = 0;
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.

b.

1
c.

12

d.

None of the choices


Feedback
Your answer is correct.

Question 8
Complete

Mark 1 out of 1

Flag question

Question text
What property of the Array object will return the numeric value of the length of an array?

Select one:

a.

The length property

b.

None of the choices

c.

The lengthOf property

d.

The getlength property

Question 9
Complete
Mark 1 out of 1

Flag question

Question text
Which of these would be valid as the first line of a for loop?
Select one:

a.

None of the choices

b.

for (x=1;x<6;x+=1)

c.

for (x+=1;x<6;x=1) 

d.

for (x==1;x<6;x+=1) 
Feedback
Your answer is correct.

Question 10
Complete

Mark 1 out of 1

Flag question

Question text
Which of the following will correctly access the fifth element of an array named "age"?

Select one:

a.

None of the choices

b.

age[5];

c.

age(5);

d.

age[4];

You might also like