100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

PRACTICE A TEST JAVASCRIPT CIW QUESTIONS WELL ANSWERED GRADED A+

Rating
-
Sold
-
Pages
10
Grade
A+
Uploaded on
20-11-2025
Written in
2025/2026

PRACTICE A TEST JAVASCRIPT CIW QUESTIONS WELL ANSWERED GRADED A+ You want to include in your form a button labeled Edit, which changes to Save when in edit mode and changes back to Edit when the form contents are saved. You are calling a function from the onclick event handler to perform this task. Which of the following is the correct code for that function? - Answers if(myB =="Edit") { myB = "Save"; } else{ myB = "Edit"; } Which of the following is a valid variable name in JavaScript? - Answers sink Which of the following correctly defines an object with a property called height, a property called width, and a method called getArea? - Answers function objRectangle(height, width) { t = height; = width; Area = getArea; } Consider the following expression: x = 25; y = 10; Which statement would evaluate to true? - Answers x > = y; You work for a mid-size company with a large Web site that has a very wide customer base. Which is the best method for testing your JavaScript code for this site? - Answers Test in various browsers, versions and operating systems. Consider the following code: <script type="text/javascript"> var v1 = "Blue"; function f () { this.v1 = "Green"; alert (this.v1); } f(); alert (v1); </script> What is the expected result when this script is run in the browser? - Answers Two alert boxes, both displaying Green What is a pop-up blocker? - Answers A browser-level security feature Consider the following statement:

Show more Read less
Institution
JAVASCRIPT
Course
JAVASCRIPT









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
JAVASCRIPT
Course
JAVASCRIPT

Document information

Uploaded on
November 20, 2025
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

PRACTICE A TEST JAVASCRIPT CIW QUESTIONS WELL ANSWERED GRADED A+

You want to include in your form a button labeled Edit, which changes to Save when in edit
mode and changes back to Edit when the form contents are saved. You are calling a function
from the onclick event handler to perform this task. Which of the following is the correct code
for that function? - Answers if(myButton.value =="Edit") {

myButton.value = "Save";

}

else{

myButton.value = "Edit";

}

Which of the following is a valid variable name in JavaScript? - Answers sink

Which of the following correctly defines an object with a property called height, a property called
width, and a method called getArea? - Answers function objRectangle(height, width) {

this.height = height;

this.width = width;

this.getArea = getArea;

}

Consider the following expression:



x = 25;

y = 10;

Which statement would evaluate to true? - Answers x > = y;

You work for a mid-size company with a large Web site that has a very wide customer base.
Which is the best method for testing your JavaScript code for this site? - Answers Test in
various browsers, versions and operating systems.

Consider the following code:



<script type="text/javascript">

, var v1 = "Blue";

function f ()

{

this.v1 = "Green";

alert (this.v1);

}

f();

alert (v1);

</script>



What is the expected result when this script is run in the browser? - Answers Two alert boxes,
both displaying Green

What is a pop-up blocker? - Answers A browser-level security feature

Consider the following statement:



Cookies can be used to store passwords so authentication is not necessary for returning users.



Which of the following choices about this statement is accurate? - Answers The statement is
true, but this practice poses a security risk.

Which code will correctly declare the calendarYear variable as a date object? - Answers var
calendarYear = new Date();

Consider the following code:



<html><head>

<script type="text/javascript">

function validatePhone(phoneField) {

var pattern = /[A-Z]/;

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
joshuawesonga22 Liberty University
View profile
Follow You need to be logged in order to follow users or courses
Sold
26
Member since
7 months
Number of followers
1
Documents
9763
Last sold
2 hours ago
Tutor Wes

Hi there! I'm Tutor Wes, a dedicated tutor with a passion for sharing knowledge and helping others succeed academically. All my notes are carefully organized, detailed, and easy to understand. Whether you're preparing for exams, catching up on lectures, or looking for clear summaries, you'll find useful study materials here. Let’s succeed together!

3.3

3 reviews

5
1
4
0
3
1
2
1
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions