All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
javascript
Questions and Answers of
JavaScript
Which of the following uses the correct case?a. Document.write()b. document.write()c. document.Write()d. Document.Write()
Which of the following is not a valid identifier? a. $InterestRateb. 2QInterest Ratec. InterestRated. _interestRate
When you assign a specific value to a variable on its creation, you __________ it.a. Declareb. Callc. Assignd. Initialize
Code that tells a browser what to do in response to a specific event on a specific element is called a(n) __________.a. Methodb. Event handlerc. Responsed. Procedure
Which method displays a dialog box with an OK button?a. Document.write()b. Document.writeln()c. Window.alert()d. Window.popup()
A section of a document that is not interpreted as markup is referred to as __________.a. PDATAb. CDATAc. PCDATAd. CPDATA
What is the difference between web page design, web page authoring, and web development?
What is the difference between character data and parsed character data? What does this have to do with JavaScript?
Write the JavaScript to add the text “Copyright 2017” as a line comment. Write the JavaScript to add the same text as a block comment.
Write a statement that creates a variable with the identifier title and the value “Dr.”
What is a library?
What is the difference between a named function and an anonymous function?
What is the difference between an integer and a floating-point number?
What is the difference between a binary operator and a unary operator?
When performing operations with operators in the same precedence group, how is the order of precedence determined?
A(n) ___ allows you to execute a related group of statements as a single unit.a. Variableb. Statementc. Eventd. Function
Why does a named function not execute automatically? How do you execute it?
Which possible values can a Boolean variable have?
How does JavaScript deal with code that performs arithmetic operations on string values?
How is the expression 5 + 2 * 8 evaluated? Explain your answer.
Parameters in a function definition are placed within __________ .a. Bracesb. Parenthesesc. Double quotesd. Single quotes
What alternatives exist to specifying an event handler using an HTML attribute?
What is an empty string?
What is a comparison operator? What kind of value does it return?
A variable that is declared outside a function is called a(n) ________ variable.a. Classb. Localc. Globald. Program
How do you view any error messages that a browser might generate when processing your code?
Why do you sometimes need to insert an extra space in a string when using the concatenation operator?
What is a falsy value? What are the six falsy values in JavaScript?
Which one of the following creates a local variable? a. Declaring it outside of a function with the var keywordb. Declaring it outside of a function without the var keywordc.
Why is it poor programming practice to declare a global variable inside of a function by not using the var keyword?
Which of the following is a primitive data type in JavaScript? a. Booleanb. Integerc. Floating-pointd. Logical
Which of the following describes JavaScript? a. Strongly typedb. Statically typedc. Loosely typedd. Untyped
Which of the following is an integer? a. -2.5b. 6.02e23c. -11d. 0.03
Which of the following is a Boolean value? a. 3.04b. Truec. “Greece”d. 6.02e23
Which of the following creates an empty string? a. Nullb. Undefinedc. ""d. 0
Which of the following is a valid JavaScript statement?a. document.write('Boston, MA is called 'Beantown.'') b. document.write("Boston, MA is called "Beantown."")c. document.write("Boston, MA is
Which of the following is a concatenation operator?a. >b. +c. ||d. ++
Which of following is the JavaScript escape character?a. "b. 'c. \d. /
Which of the following is an arithmetic binary operator?a. +b. ||c. =d. &&
Which of the following is an arithmetic unary operator?a. ++b. ||c. =d. &&
What is the result of the statement 5 < 4? a. 1b. Yesc. Trued. False
Write a simple function (or copy one used in this chapter), that includes the following parts, and then label the parts:NameParametersFunction bracesFunction statements
Explain the difference between prefix and postfix operators, and provide an example of each.
What is the result of the following expression? 5 > 4? document.write("green"): document.write("blue"); Name the operators, and explain the steps you took to arrive at your answer.
What is the result of the expression 5 % 4? Name the operator, and explain the steps you took to arrive at your answer.
Explain the difference between global and local variables, and describe how using or not using the var keyword can affect the scope of a variable.
How is an array different from a standard variable?
What is the role of a counter in a repetition statement?
What does an if statement do when its condition evaluates to a falsy value?
What is the correct syntax for creating an empty array named taxRules?a. var taxRules = {};b. var taxRules;c. var taxRules = [];d. var taxRules[5];
How do you create a new empty array?
What are the differences between a while and do/while statement?
What can you do with an if/else statement that you can’t do with an if statement?
Which of the following statements adds the value “oak” as the third element of the trees array?a. trees += "oak";b. trees += "","","oak";c. trees[2] = "oak";d. trees[3] = "oak";
How do you access an individual element in an array?
Which repetition statement allows you to initialize a counter variable as part of its syntax?
Why would you nest decision-making statements?
Which of the following properties returns the number of elements in an array?a. Lengthb. Sizec. Elementsd. Indexes
What property do you use to determine the number of elements in an array?
How do you force a new iteration of a loop even when its condition evaluates to a falsy value?
How do you specify possible values for the expression in a switch statement?
Which characters are used to create a command block?a. ( )b. [ ]c. { }d. <>
How do you use a browser to check the value of a specific array element?
What statement should you include at the end of the code for each case label in a switch statement? Why is it important to include this statement?
You track the progress of a loop with a(n) _________.a. Counterb. Iterationc. Incrementd. Decrement
The statements in a(n) _______ statement always execute at least once.a. Forb. Do/whilec. Switchd. If
If you do not include code that changes the counter value in a loop statement, your program will be caught in a(n) __________.a. Iterationb. Conditionc. Fallthroughd. Infinite loop
When is a for statement initialization expression executed?a. When the for statement begins executingb. With each repetition of the for statementc. When the counter variable is
The parentheses at the start of a(n) ______ statement can include code that initializes a counter and changes its value with each iteration.a. Whileb. Doc. Do/whiled. For
The ___ statement halts a looping statement and restarts the loop with a new iteration.a. Restartb. Continuec. Breakd. Halt
An if statement can include multiple statements provided that they ___.a. Execute after the if statement’s closing semicolonb. Are not contained within a command blockc. Do not include
A simple if/else statement enables you to specify code for ____ alternatives.a. 2b. 3c. 4d. Unlimited
The _______ statement is equivalent to the conditional operator (?:).a. Ifb. If/elsec. Nested ifd. Switch
A switch statement compares the value of an expression to a value contained in a(n) _______.a. Default labelb. Case labelc. Fallthroughd. Break statement
When the value returned by a switch statement expression does not match a case label, then the statements within the ___ label execute.a. Errorb. Elsec. Exceptiond. Default
Provide the code to access the value of the fourth element in the projectTeam array, and explain how you determined the index value.
Explain what causes an infinite loop, and what you can to do ensure that your programs do not contain infinite loops.
What does an else if statement replace? What are the advantages of using an else if statement?
Explain what “fallthrough” means and how to prevent it.
A URL is a type of _________.a. Web pageb. URIc. Linkd. Network
Why should you place scripts at the end of an HTML document’s body section?
What is an identifier? What limits does JavaScript place on an identifier?
JavaScript code in an HTML document goes within which HTML element?
In client/server architecture, what is a client? What is a server?
What method of accessing documents did Tim Berners-Lee create? What was noteworthy about his system?
What is the difference between an array and a standard variable?
Showing 300 - 400
of 386
1
2
3
4