



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 / 7
This page cannot be seen from the preview
Don't miss anything!




toUpperCase() - ✔✔Which method convert a string value to uppercase letters? abort - ✔✔Which event occurs when the loading of an image is terminated? blur - ✔✔Which event occurs when a user clicks the mouse button outside of a particular input field? click - ✔✔Which event occurs when the user clicks on a link or form element? change - ✔✔Which event occurs when a user modifies the value of a form field? error - ✔✔Which event occurs when there is a problem loading an external image or resource? focus - ✔✔Which event occurs when a user clicks into a form field? load - ✔✔Which event occurs when a page is opened? mouseOver - ✔✔Which event occurs when the user moves the mouse pointer over a link, image or other visible element on a page? mouseOut - ✔✔Which event occurs when the mouse pointer leaves a link, image or other visible element on a page? reset - ✔✔Which event occurs when a form's Reset button is clicked? select - ✔✔Which event occurs when the user highlights the text in a form field? submit - ✔✔Which event occurs when a form's Submit button is clicked?
unload - ✔✔Which event occurs when a page closed? properties - ✔✔What are attributes of an object, such as height, color, font size, sentence length and so forth? methods - ✔✔What are actions that an object can be made to perform? alert() - ✔✔Which method creates a pop-up box with the specified message string, which the user can dismiss by clicking a button in the box? prompt() - ✔✔Which method creates a pop-up box with the specified message string and requests user input into a text field in the box? confirm() - ✔✔Which method creates a pop-up box with the specified message string and requests user confirmation by clicking the OK or Cancel button in the box? document.write() - ✔✔Which method writes the specified message string in the page? variable - ✔✔What is a named space of memory? = - ✔✔Which operator is used to assign values? number - ✔✔Which data type holds any numeric value used for mathematical operations? string - ✔✔Which data type holds any string of alphanumeric characters used for words or for numbered phrases that are not mathematically manipulated? var birthYear = "1956" - ✔✔Which expression creates a string value? var birthYear = 1956 - ✔✔Which expression creates an integer value?
Example: (a > b)? a++ : a-- concatenation - ✔✔What process combines text strings using the plus sign? Example: "hello" + "world" function - ✔✔What is a named set of statements that performs a task or calculates a value? function myFunction(){} - ✔✔How do you declare a function? calling statement - ✔✔What processes a function's statements? nothing - ✔✔What happens if you define a function but do not call it? myFunction() - ✔✔How do you call this function? function myFunction(){ return "success"; } return - ✔✔What is used to output values from a function? local variable - ✔✔What type of variable is declared within a function and available only from within that function? global variable - ✔✔What type of variable is available throughout the entire script? argument - ✔✔What is a value or expression containing data or code that is passed on to a function?
pass by reference - ✔✔What describes when values are passed to a function, and the function's parameters receive a copy of its argument's value? Example: function myFunction(x){ return x; } var num = 2; myFunction(num); pass by value - ✔✔What describes when values are passed to a function, and the function's parameters receive its argument's actual value? Example: function myFunction(x){ return x; } myFunction(2); isNaN() - ✔✔Which method determines whether an value is a number? parseInt() - ✔✔Which method converts a string to its integer equivalent? parseFloat() - ✔✔Which method converts a string to its floating-point decimal equivalent? Load-time errors - ✔✔Which errors are typically syntax errors and usually cause error alerts? Run-time errors - ✔✔Which errors occur after the script has loaded and is running, typically caused by improper use of commands?
the dollar sign ( $ ) - ✔✔What must variable names begin with? unique - ✔✔Is these variables the same or unique? var Result var result var RESULT navigator - ✔✔Which object allows you to determine information about the user's browser? navigator.appName - ✔✔Which property returns a string value indicating the name of the client browser? navigator.appVersion - ✔✔Which property returns a string value indicating the version number of the client browser, as well as the client's platform? 0 - ✔✔What is the value of myVar after execution? function counter(x) { return x + 1; } var myVar = 0; counter(myVar); alert(myVar); The total is 1.03 - ✔✔What will the alert box display? var subTotal = 1; var tax = 0.03; alert("The total is " + subTotal * (1 + tax));