Deck 10: Programming with JavaScript
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/139
العب
ملء الشاشة (f)
Deck 10: Programming with JavaScript
1
Parameter values cannot be variables themselves.
False
2
The great advantage of a function is that you can reuse it.
True
3
Some JavaScript functions require parameters,which are variables associated with the function.
True
4
JavaScript commands can be inserted directly into an HTML file rather than being placed in a separate program file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
5
Early on,a problem with Java was that nonprogrammers found it difficult to learn and use to write their own Java applets.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
6
Function parameters must be placed within parentheses,following the function name,and the parameters must be separated by periods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
7
Most JavaScript commands and names are not case sensitive.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
8
In Java,programs cannot write content to the hard disk.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
9
Spam reduces productivity by forcing employees to wade through numerous spam messages every day to find messages that are truly relevant.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
10
The document.write()and document.writeln()methods reflect the object-oriented nature of the JavaScript language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
11
It is common practice for JavaScript programmers to create libraries of functions located in external files that are easily accessible to many Web pages.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
12
When the browser loads the HTML file containing a function,the browser bypasses the function without executing it; the function is executed only when called by another JavaScript command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
13
If a function returns a value,it can be stored in a variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
14
Where you place a function in the HTML file is unimportant.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
15
Essentially,Java and JavaScript are the same.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
16
You cannot use words that JavaScript has reserved for other purposes when you create a variable name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
17
Users need to work with a developer's kit to compile a JavaScript program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
18
JavaScript code can be inserted directly into an HTML file,or placed in a separate text file that is linked to the Web page.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
19
A function cannot be designed to return a value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
20
In client-side programming,programs that run on the client side directly change the server data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
21
In XHTML,the language attribute is used to indicate the script language in the
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
22
A multiline comment begins with a /* and ends with a */._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
23
If you place JavaScript code in a separate file,the different pages in your Web site can use the programs you write in the same way that an entire site can use an external style sheet._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
24
A(n)____ is a person who sends out unsolicited e-mails.
A) analyst
B) spammer
C) harvester
D) staffer
A) analyst
B) spammer
C) harvester
D) staffer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
25
With server-side scripts,computing is distributed over the Web,so that no one server is overloaded with programming requests._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
26
____ is essentially junk e-mail.
A) Spam
B) Client-side
C) Server-side
D) An e-mail harvester
A) Spam
B) Client-side
C) Server-side
D) An e-mail harvester
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
27
Although not a requirement,one programming convention is to place all of the function definitions used in the Web page within the head section._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
28
Function names,unlike variable names,are case-sensitive._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
29
You can ____ an e-mail address to prevent it from being grabbed by programs that scan Web pages.
A) inherit
B) compile
C) spam
D) scramble
A) inherit
B) compile
C) spam
D) scramble
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
30
____ can be used to look for e-mail addresses by scanning Web pages.
A) Spam
B) Server-side
C) An e-mail harvester
D) Client-side
A) Spam
B) Server-side
C) An e-mail harvester
D) Client-side
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
31
A global variable has local scope only._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
32
Which of the following does not have features to scramble or unscramble e-mail addresses?
A) HTML
B) XHTML
C) XML
D) both a and b
A) HTML
B) XHTML
C) XML
D) both a and b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
33
A text string indicates that no value has yet been assigned to the variable._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
34
Any variables not declared within functions have local scope._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
35
A numeric value is any group of characters such as "Hello." _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
36
You can declare multiple variables by entering the variable names in a comma-separated list._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
37
The Boolean values are on and off._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
38
You should declare a variable in JavaScript by using the syntax: var variable;._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
39
A hacker is a person who sends these unsolicited e-mails,sometimes in bulk e-mailings involving tens of thousands of recipients._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
40
You should place all script elements that reference external files in the document head._________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
41
One way to handle the way that XML parsers treat the content of a JavaScript program is to place the JavaScript code within a(n)____ section.
A) CDATA
B) PCDATA
C) XML
D) ASP
A) CDATA
B) PCDATA
C) XML
D) ASP
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
42
JavaScript supports comment tags,using a set of double ____ at the beginning of a line that instructs the browser to ignore the line and not interpret it as a JavaScript command.
A) backslashes
B) commas
C) periods
D) slashes
A) backslashes
B) commas
C) periods
D) slashes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
43
Java requires that users have access to the ____ in order to create an executable Java applet.
A) DTD
B) JDK
C) ECMA
D) DDL
A) DTD
B) JDK
C) ECMA
D) DDL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
44
Placing JavaScript code in a Web page file means that users need to retrieve only ____ file from the server.
A) one
B) two
C) duplicate
D) text
A) one
B) two
C) duplicate
D) text
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
45
You use the ____ tag to distinguish JavaScript code from the text that you want displayed on a Web page.
A)
A)
B)
C)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
46
There is no limit to the number of ____ elements used within a Web page.
A) mime
B) type
C) script
D) jscript
A) mime
B) type
C) script
D) jscript
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
47
Which of the following is NOT an alternative that helps avoid problems with XML parsers?
A) comment the Javascript
B) use CDATA sections
C) use external scripts
D) all of the above
A) comment the Javascript
B) use CDATA sections
C) use external scripts
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
48
The text string specified by the document.write()method can be enclosed within ____.
A) double quotation marks
B) single quotation marks
C) commas
D) either a or b
A) double quotation marks
B) single quotation marks
C) commas
D) either a or b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
49
Scripting languages are distinguished by their ____ types.
A) MIME
B) DTD
C) XML
D) DDL
A) MIME
B) DTD
C) XML
D) DDL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
50
The type attribute value for JavaScript is ____.
A) text/js
B) text/javascript
C) script/js
D) script/javascript
A) text/js
B) text/javascript
C) script/js
D) script/javascript
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
51
JavaScript requires _____ programming knowledge and experience as Java.
A) more
B) less
C) the same
D) twice as much
A) more
B) less
C) the same
D) twice as much
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
52
Each JavaScript command line ends with a(n)____ to separate it from the next command line in the program.
A) comma
B) ampersand
C) semicolon
D) period
A) comma
B) ampersand
C) semicolon
D) period
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
53
_________ code can be inserted directly into an HTML file or placed in a separate text file that is linked to a Web page.
A) JavaScript
B) Java
C) JScript
D) Java Applets
A) JavaScript
B) Java
C) JScript
D) Java Applets
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
54
____ is an interpreted language,meaning that the program code is executed directly without compiling.
A) JavaScript
B) Java
C) C++
D) All of the above
A) JavaScript
B) Java
C) C++
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
55
____ is the process by which a program is converted from a text file of code into an executable file called an applet.
A) Inheritance
B) ECMA
C) Scripting
D) Compiling
A) Inheritance
B) ECMA
C) Scripting
D) Compiling
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
56
Scripts can be placed in a ____ section of a Web page.
A) head
B) body
C) both a and b
D) none of the above
A) head
B) body
C) both a and b
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
57
____-side programs do not require users to wait for data to be sent over the Internet to a Web server.
A) Server
B) File
C) Client
D) Database
A) Server
B) File
C) Client
D) Database
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
58
A(n)____ retrieves a Web page from the server.
A) programmer
B) server-side program
C) user
D) information set
A) programmer
B) server-side program
C) user
D) information set
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
59
In earlier versions of HTML,the ____ attribute was used to indicate the scripting language.
A) type
B) language
C) MIME
D) src
A) type
B) language
C) MIME
D) src
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
60
What is Internet Explorer's scripting language called?
A) IEScript
B) VBScript
C) Oak
D) JavaScript
A) IEScript
B) VBScript
C) Oak
D) JavaScript
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
61
JavaScript is ____,so you must pay attention to whether or not letters are capitalized.
A) case insensitive
B) case sensitive
C) case indifferent
D) none of the above
A) case insensitive
B) case sensitive
C) case indifferent
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
62

In the figure above,what are the variables?
A) userName
B) emServer
C) emLink
D) all the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
63
In naming a variable,the first character must be either a letter or a(n)____.
A) underscore
B) pound sign
C) number sign
D) ampersand
A) underscore
B) pound sign
C) number sign
D) ampersand
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
64
Another method to write text to the Web page is the ____ method.
A) document.writeln()
B) document.writeline()
C) document.insrtln()
D) document.insrtline()
A) document.writeln()
B) document.writeline()
C) document.insrtln()
D) document.insrtline()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
65
____ are useful because they can store information created in one part of your program and use that information in another.
A) Conditional operators
B) Logical operators
C) Assignment operators
D) Variables
A) Conditional operators
B) Logical operators
C) Assignment operators
D) Variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
66
You can indicate that a statement continues on the next line using a ____.
A) comment
B) forwardslash
C) backslash
D) comma
A) comment
B) forwardslash
C) backslash
D) comma
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
67
One can create a ____ variable to determine whether the user is running the Safari browser.
A) null
B) string
C) conditional
D) Boolean
A) null
B) string
C) conditional
D) Boolean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
68
A(n)____ variable has no value at all.
A) null
B) empty
C) cipher
D) negative
A) null
B) empty
C) cipher
D) negative
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
69
Before you use a variable in a JavaScript program,you should ____ it.
A) compile
B) concatenate
C) declare
D) nullify
A) compile
B) concatenate
C) declare
D) nullify
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
70
Which of the following formats is not a numeric value data type?
A) "12"
B) 11.5
C) 3
D) 5.1E2
A) "12"
B) 11.5
C) 3
D) 5.1E2
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
71

In the figure above,what is the value stored in emLink?
A) cadler@mpl.gov
B) usernName@mpl.gov
C) userName@emServer
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
72
An action for the browser to take in a script is called a ____.
A) command
B) statement
C) both a and b
D) none of the above
A) command
B) statement
C) both a and b
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
73
Variable declarations should be placed at the ____ of your program to make your code easier to interpret.
A) middle
B) end
C) beginning
D) none of the above
A) middle
B) end
C) beginning
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
74
You can cause a variable to have no value by assigning it the value ____.
A) 0
B) null
C) empty
D) " "
A) 0
B) null
C) empty
D) " "
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
75
Variable names cannot contain ____.
A) numbers
B) spaces
C) underscore characters
D) any of the above
A) numbers
B) spaces
C) underscore characters
D) any of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
76
You can declare a variable in JavaScript using the ____ command.
A) dec
B) var
C) this
D) val
A) dec
B) var
C) this
D) val
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
77
A(n)____ variable is any group of characters,such as "Hello" or "Happy Holidays!".
A) Boolean
B) data
C) text string
D) null
A) Boolean
B) data
C) text string
D) null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
78
You can display single quotation marks with the document.write()method by enclosing your text string within ____.
A) periods
B) double quotation marks
C) parentheses
D) brackets
A) periods
B) double quotation marks
C) parentheses
D) brackets
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
79
JavaScript supports how many data types?
A) 1
B) 2
C) 3
D) 4
A) 1
B) 2
C) 3
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck
80
JavaScript ____ most occurrences of white space.
A) repeats
B) ignores
C) comments
D) executes
A) repeats
B) ignores
C) comments
D) executes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 139 في هذه المجموعة.
فتح الحزمة
k this deck