- Which Language is more sophisticated JavaScript or Java?
- They both have the same level of sophistication.
- JavaScript.
- JScript is actually more sophisticated
than either.
- Java.
- None of the above.
- Is JavaScript ISO compliant?
- Yes.
- No.
- ISO Does not apply to JavaScript.
- On a Fast Track Process.
- Can JavaScript access the local file system?
- Yes.
- No.
- Sometimes.
- None of the above.
- Can JavaScript Make Network Connections?
- Yes.
- No.
- Sometimes.
- None of the above.
- Can JavaScript draw graphics?
- Yes.
- No.
- Sometimes.
- None of the above.
- <script>
..</script>
If the language attribute is not defined, what version of JavaScript is
the default?
- Whatever the default version of JavaScript is for that
particular browser.
- 1.5
- 1.2
- 1.1
- None of the above
- Which logical HTML tag denotes strong emphasis?
- <ADDRESS>
- <EM>
- <I>
- <STRONG>
- <VAR>
- What is the code for a single line JavaScript comment?
- /* This is a single line JavaScript
comment*/
- /* This is a single line JavaScript
comment
- // This is a single line JavaScript
comment
- None of the above
- What is the code for a JavaScript comment block?
- /* This is a JavaScript comment block*/
- /* This is a JavaScript comment block
- // This is a JavaScript comment block
//
- None of the above
- What tag can be used to display a message on a browser that does not support
JavaScript?
- <nojavascript>...<nojavascript>
- <js="off">...</Js>
- <noscript> your browser sucks.
get one that supports JavaScript</noscript>
- Any of the above
- None of the above
The <noscript> tag is sort of a mute point since all of the mainstream
browsers support JavaScript. In the 'old' days it was standard practice
to place a non-scripted version of the web page in between the <noscript>
tags. If a user has turned Scripting off in their browser preferences
then the tag has relevance for notification and a non scripted display.
- If more than one JavaScript statement appears on the same line what punctuation
mark is used to terminate/separate each statement?
- comma
- semicolon
- colon
- period
- ampersand
- What punctuation mark(s) are used to define a sequence of string characters,
such as WELCOME?
- Surround WELCOME with brackets [WELCOME]
- Surround WELCOME with single quotes 'WELCOME'
- Surround WELCOME with double quotesWELCOME
- Surround WELCOME with either single or double quotes 'WELCOME'
or WELCOME
- What are the syntax rules for specifying identifiers??
- Letters, underscores, dollar signs
- First char may not be a number
- Upper or lower letters are allowed
- all of the above
- Within a function, how do you differentiate between a local and global
variable?
- Keep it in the curly brackets
- use single quotes
- Within a function use the key word global
- Within a function, using the keyword var makes the variable
local
This is especially important when trying to access a variable. If you
want to set a variable that has a recognized value outside the confines
of your function then leave the var keyword out of the syntax. If its
availability is better restricted to the function then use the var keyword.
- Where should function definitions be placed in the HTML code and why?
- Always place your code outside the
<html> tags, the browser likes that
- <body> functions need to be close
to what you want effected
- <head> Browsers parses this code
first,before the <body>
- None of the above.
Functions are best placed in the head and/or referred to in an external
file. JavaScript commands will appear in the body as well as the head.
- What is the code to refer to an external file containing function definition(s)?
- <script language="JavaScript" url="myCode.js"></script>
- <script language="JavaScript" src="myCode.js"></script>
- <script language="JavaScript" href="myCode.js"></script>
- Any of the above will work
Placing your common JavaScript code in an external file is always a good
idea.
- Using the for loop, what is the code to perform a single statement 25
times?
- for (init; test; increment)
for (i=0;i<25;i++)
- for (init; test; increment)
for (i=0;i>25;i++)
- for (init; test; increment)
for (i=0;i<25;i+)
- None of the above
- What is the purpose of the break and continue statements?
- Stop and start JavaScript
- Manage function variables
- Manipulate flow of control within a
loop
- None of the above
- String values can be captured using which operation ?
- alert.
- confirm.
- prompt
- None of the above.
That is a very cool way to capture user input from a dialoge box.
- How do I declare and initialize an identifier named greeting with the
value WELCOME?
- greeting :WELCOME
- greeting = WELCOME;
- greeting=WELCOME
- Any of the above
This was just for