November 7, 2016 0 Welcome to your JavaScript Name How to create a Date object in JavaScript?dateObjectName = new Date([parameters])dateObjectName := new Date([parameters])dateObjectName Date([parameters])dateObjectName.new Date([parametersWhen a user views a page containing a JavaScript program, which machine actually executes the script?None of the aboveThe Web serverA central machine deep within Netscape's corporate officesThe User's machine running a Web browserWhich of the following is not a valid JavaScript variable name?None of the aboveFirstAndLast_first_and_last_names2namesWhat are variables used for in JavaScript Programs?Causing high-school algebra flashbacksNone of the aboveVarying randomlyStoring numbers, dates, or other valuesChoose the server-side JavaScript object?FileUpLoadFunctionDateFileWhat 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 IIII and IVOnly IIIJavaScript entities start with _______ and end with _________.Semicolon, colonAmpersand, colonSemicolon, AmpersandAmpersand, semicolonHow does JavaScript store dates in a date object?The number of days since January 1st, 1900The number of milliseconds since January 1st, 1970None of the aboveThe number of seconds since Netscape's public stock offeringWhich is not an Javascript HTML eventonload,onscrollNone of theseonmouseover, onmouseleave, onmouseenteronclick, onchange, onkeydown, onkeyupWhat will be output ? <script language="javascript"> function x() { document.write(2+5+"8"); } </script>7Error25878To 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 propertyWhat is the special feature of the modern web applications? c. d.Can alter contents without loading documentBoth a and bNone of the mentionedMust load the document to manipulateWhich 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.reverse();points.sort(function(a, b){return b - a});points.sort(function(a, b){return a - b});Which 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, IIIII and IIII and IIIOnly IConsider the following code snippet const pi=3.14; var pi=4; console.log(pi); What will be the output for the above code snippet? This will flash an errorPrints 3.14AmbiguityPrints 4Which of the following can't be done with client-side JavaScript?None of the aboveSending a form's contents by emailStoring the form's contents to a database file on the serverValidating a formWhat 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 resultAll are TrueOnly IVOnly IIII and III onlyWhy so JavaScript and Java have similar name?JavaScript's syntax is loosely based on Java'sThey both originated on the island of JavaNone of the aboveJavaScript is a stripped-down version of JavaWhich is correct way to get object index value.objectName[“index”]objectName.propertyNameBoth A and BobjectName["propertyName"]What is the correct JavaScript syntax to write "Hello World"?document.write("Hello World")response.write("Hello World")println ("Hello World")System.out.println("Hello World")_____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.Client-sideServer-sideLocalNativeWhich of the following best describes JavaScript?a compiled scripting languagean object-oriented scripting languagea scripting language precompiled in the browsera low-level programming language.What will be output of following code into alert: "use strict"; myFunction(); function myFunction() { y = 3.14; alert("Value of y is " +y); }None of the aboveValue of y is undefinedy is not declared definedValue of y is 3.14Integer Variable is declared using following syntax in JavaScriptVar num;INT num;None of theseInteger num;Using _______ statement is how you test for a specific condition.IfForSwitchSelectWhat will be output ? <h1 onclick="changeText(this)">Click on this text!</h1> <script> function changeText(id) { id.innerHTML = "Ooops!"; } </script>Ooops!Click on this text!ErrorExecute will Blank h1Time is Up!