November 7, 2016 0 Welcome to your JavaScript Name What will be output ? <h1 onclick="changeText(this)">Click on this text!</h1> <script> function changeText(id) { id.innerHTML = "Ooops!"; } </script>Ooops!Execute will Blank h1ErrorClick on this text!How to create a Date object in JavaScript?dateObjectName.new Date([parametersdateObjectName Date([parameters])dateObjectName = new Date([parameters])dateObjectName := new Date([parameters])What are variables used for in JavaScript Programs?None of the aboveCausing high-school algebra flashbacksVarying randomlyStoring numbers, dates, or other valuesWhich of the following best describes JavaScript?a compiled scripting languagea scripting language precompiled in the browseran object-oriented scripting languagea low-level programming language.Why so JavaScript and Java have similar name?They both originated on the island of JavaNone of the aboveJavaScript's syntax is loosely based on Java'sJavaScript is a stripped-down version of JavaChoose the server-side JavaScript object?FileFunctionFileUpLoadDateJavaScript entities start with _______ and end with _________.Ampersand, colonSemicolon, colonSemicolon, AmpersandAmpersand, semicolonWhat will be output of following code into alert: "use strict"; myFunction(); function myFunction() { y = 3.14; alert("Value of y is " +y); }y is not declared definedNone of the aboveValue of y is 3.14Value of y is undefinedWhat is the correct JavaScript syntax to write "Hello World"?document.write("Hello World")response.write("Hello World")System.out.println("Hello World")println ("Hello World")When a user views a page containing a JavaScript program, which machine actually executes the script?None of the aboveThe User's machine running a Web browserA central machine deep within Netscape's corporate officesThe Web serverWhich is correct Syntax to sort numerical array alphabetically array is : var points = [40, 100, 1, 5, 25, 10]; I. points.sort(function(a, b){return a - b}); II. points.sort(function(a, b){return b - a}); III. points.sort(); points.sort();points.sort(function(a, b){return b - a});points.sort(function(a, b){return a - b});points.reverse();Which of the following is not a valid JavaScript variable name?2namesNone of the aboveFirstAndLast_first_and_last_namesWhat is the special feature of the modern web applications? c. d.Must load the document to manipulateNone of the mentionedCan alter contents without loading documentBoth a and bWhich is true about string methods ? I. The indexOf() method returns the index of the first occurrence of a specified text in a string II. The lastIndexOf() method returns the index of the last occurrence of a specified text in a string III. Both the indexOf(), and the lastIndexOf() methods return -1 if the text is not foundAll I, II, IIII and IIIOnly III and IIIConsider the following code snippet const pi=3.14; var pi=4; console.log(pi); What will be the output for the above code snippet? AmbiguityPrints 3.14Prints 4This will flash an errorTo change the style of an HTML element correct Syntax isdocument.getElementByClass(Class).style.Val=new Propertydocument.getElementById(id).style.property=new styledocument.getElementByClass(id).Css.style.property=new styledocument.getElementById(id).Css= New propertyUsing _______ statement is how you test for a specific condition.SwitchForSelectIfWhat is not true about try-catch block? I. The try statement allows you to define a block of code to be tested for errors while it is being executed II. The catch statement allows you to define a block of code to be executed, if an error occurs in the try block III. try {Block of code to try } catch( Exception err){ message.innerHTML = "Input is " + err; } IV. The finally statement lets you execute code, after try and catch, regardless of the resultOnly IIIOnly IVAll are TrueI and III onlyWhat will be output ? <script language="javascript"> function x() { document.write(2+5+"8"); } </script>Error782587How does JavaScript store dates in a date object?None of the aboveThe number of milliseconds since January 1st, 1970The number of days since January 1st, 1900The number of seconds since Netscape's public stock offeringWhich is correct way to get object index value.objectName[“index”]objectName.propertyNameobjectName["propertyName"]Both A and BWhich of the following can't be done with client-side JavaScript?Sending a form's contents by emailValidating a formNone of the aboveStoring the form's contents to a database file on the serverWhat is not true about String Functions? I. slice(), substring(), substr() are methods for extracting a part of a string II. If a parameter is negative, the position is counted from the end of the string III. If you omit the second parameter, the method will slice out the rest of the string IV. substring() is not similar to slice() and substring() cannot accept negative indexes. Only IVOnly IIOnly IIIII and IV_____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.Server-sideLocalClient-sideNativeInteger Variable is declared using following syntax in JavaScriptINT num;None of theseVar num;Integer num;Which is not an Javascript HTML eventNone of theseonmouseover, onmouseleave, onmouseenteronload,onscrollonclick, onchange, onkeydown, onkeyupTime is Up!