


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
JAVASCRIPT Exam Questions and Answers Latest Graded A+
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



JavaScript is a scripting language for adding dynamic interactivity to Web pages. You can use JavaScript to: - ✔✔interpret the script and return the appropriate responses on the client side or on the server side. What type of language is HTML? - ✔✔Markup language Which of the following best describes an object-oriented program? - ✔✔A collection of individual objects that perform different functions The development of HTML5 APIs is expected to intensify as mobile devices continue to multiply. Which technology provides the advanced interactivity required for APIs? - ✔✔JavaScript Which of the following is a characteristic of event-driven programming? - ✔✔Events can trigger functions. Why should you test your JavaScript code in multiple browsers? - ✔✔Because JavaScript programs tend to be implemented differently in different browsers What step should you take to ensure that your JavaScript code runs as expected? - ✔✔Test your code in various browsers. What is the main characteristic of a programming language that distinguishes it from a scripting language? - ✔✔Programming languages are traditionally compiled, whereas scripting languages are traditionally interpreted. Why is JavaScript relatively easy to learn? - ✔✔Because JavaScript does not have all of the complex rules associated with full object-oriented languages Which of the following best describes the relationship between JavaScript and Java? - ✔✔JavaScript and Java are different languages and have no relationship Which organization approved JavaScript as an international standard in 1997? - ✔✔European Computer Manufacturer's Association (ECMA)
What is Microsoft's implementation of JavaScript called? - ✔✔JScript What term is a characteristic of an object that describes the object's attributes? - ✔✔Property Consider the following code:
Page Title
HTML page text goes here
This is an example of what? - ✔✔Calling external JavaScript In which sections of an HTML document can you embed JavaScript code? - ✔✔The and/or the sections Between which tag pair should you reference an external .js file in your HTML document when you want to add JavaScript from an external text file? - ✔✔The tag pair Which statement about scripting languages is true? - ✔✔Scripting languages sometimes provide less functionality than full programming languages, but are usually easier to learn. Which of the following is the most similar to JavaScript in purpose and implementation? - ✔✔VBScript
What is a variable in JavaScript? - ✔✔A named space of memory that allows you to store a value Which variable data type represents a value of "nothing?" - ✔✔The null data type Consider the following code: var birthYear = "1956"; What data type does the variable birthYear contain? - ✔✔The string data type In JavaScript, what is a literal? - ✔✔The actual data value you provide in JavaScript In programming, what should you use to instruct the program how to store or evaluate a value? - ✔✔An operator What variable data type should you use if you want to store numeric values that are to be used in mathematical calculations? - ✔✔The number data type Consider the following expression: "Good morning, " + "Sarah"; What type of expression does this code snippet represent? - ✔✔String Consider the following expression: apartmentNumber = 523; What type of expression does this code snippet represent? - ✔✔Assignment What is an expression in JavaScript? - ✔✔A part of a statement that is evaluated as a value In JavaScript, how do you combine text strings, such as combining the prompt() and alert() methods to request user input and then display it? - ✔✔Use concatenation to link two or more text strings.