-Infinity in JS gets added with -Infinity then output of the code will be
1.+Infinity
2.NaN
3.-Infinity
4.None of the above
Comments in JS are ignored by ____________.
1.Compiler
2.Operating System
3. JVM
4.Browser
How can you get the type of arguments passed to a function?
1.using typeof operator
2.using getType function
3.Both of the above.
4.None of the above
JavaScript code contain sequence of ___________.
1.HTML Tags
2.Method Calls
3.Executable Statements
4.All of the these
JS Comment can be used for following purposes -
1.to Hide Non-usable line
2.to Hide Non-usable Multiline Code
3.used for Documentation
4.All of these
Person XYZ wrote his name and date of code creation at the start , What kind of comment he has written ?
1. Functional Comment
2.Code Hiding Comment
3. Documentation Comment
4.None of These
State the correct place of JS Code inside HTML -
1.Inside Body
2.Inside Head
3.Inside Single JavaScript File
4.All of these
Which of the following function of String object executes the search for a match between a regular expression and a specified string?
1.concat()
2.match()
3.replace()
4.search()
Which of the following is a valid type of function javascript supports?
1.named function
2.anonymous function
3.Both of the above
4.None of the above
Which of the following is not a compound assignment operator ?
1.===
2.<<=
3.+=
4.>>=
+Infinity in JS gets added with +Infinity then output of the code will be
1.NaN
2.+Infinity
3.-Infinity
4.Null
....................... is a built - in JavaScript function which can be used to execute another function after a given time interval.
1.Timeout( )
2.TimeInterval( )
3.setTimeout ( )
4.All of the above
43. Java Statement terminated by ______________ .
1.Slash
2.Semicolon
3.Full Stop
4.Comma
Below Code contain one executive Statement. Guess the Output of the Code. <script type="text/javascript"> { document.Write("<h1>This is a heading</h1>"); } </script>
1."This is a heading" will be printed in H1 heading
2.Just "This is a heading" will be printed because HTML tags are not allowed
3.Will not print anything
4.None of these
Comment Statement is _________________ type of statement.
1.Executive
2.Non Important
3.Non Executable
4. Non Usable
Cost for Using JavaScript in your HTML is _________ .
1.Its Free !!!
2. $10 / Year
3.$15 / Year
4. $5 / Year
During addition of two numbers , suppose one of the number is NaN then output of the following code will be ?
1.NaN
2.Zero
3.Infinite
4.Null
Executable single line of Script is called as _________________.
1.Statement in JavaScript
2.Breakpoint in JS
3.Line in JS
4.None of These
Group of JavaScript Statements is called as _________
1.Statement Block
2.Group
3.Cluster
4. Code Block
If a string cannot be converted to a number __________ will be returned.
1. NaN
2.Infinite
3.Null
4.Zero
If the values on either side of '+' operator are numerical values then ___________.
1.values are concatenated together
2.values are added together
3.no effect
4.None of These
In March 1996, _______________ was released, featuring support for JavaScript.
1.Netscape Navigator 1.0
2.Internet Explorer 2.0
3.Netscape Navigator 2.0
4.Internet Explorer 1.0
Integer Variable is declared using following syntax in JavaScript.
1. Integer num;
2.var num;
3. int num;
4.integer num;
Java Script entities start with ___________and end with _____________.
1. Semicolon, colon
2.Semicolon, Ampersand
3.Ampersand, colon
4.Ampersand, semicolon
JavaScript Code is written inside file having extension __________.
1..jvs
2..javascript
3. .js
4. .jsc
JavaScript is invented by ________.
1.Brendan Eich
2.Helsinki, Linus
3.W3 Group
4.James Gosling
JavaScript is ______ Side Scripting Language.
1. Server
2.ISP
3.Browser
4.None of the these
Javascript is _________ language.
1.Programming
2.Application
3.Scripting
4.None of These
JavaScript Statements are executed by ________ .
1.Server
2.JVM
3.Compiler
4.Browser
JavaScript was invented at _______ Lab .
1.Netscape
2.Google Lab
3.AT&T Bell Lab
4.Sun Microsystem
JavaScript was originally developed under the name _______.
1.ActionScript
2.Mocha
3.Oak
4.Sencha
Local Browser used for validations on the Web Pages uses __________.
1.Java
2.CSS
3.HTML
4.JS
Microsoft Developed a compatible dialect of JavaScript called _____________.
1.JScript
2.MS JavaScript
3.MJavaScript
4.Advanced JavaScript
Multiple Declarations of variables are separated by ___________ symbol.
1.Semicolon
2.Colon
3.Comma
4.Asterisk
Multiple JS statements are written inside pair of ________ to form a statement block.
1. Pair of Square Brackets
2.Pair of Round Brackets
3.Pair of Curly braces
4.None of these
Single Line Comment in JavaScript Starts with _________ Symbol.
1.""
2. "//"
3. "$$"
4."#"
Spaces,Punctuation marks are called as __________ Symbols in JavaScript.
1. Special
2.Punctual
3.Mandetory
4. None of these
The async attribute can be set in the following ways -
1.<script async>
2.<script async="">
3.<script async="async">
4.All of the these
var num; Above Statement is called as __________ Statement.
1.Instantization
2.Globalization
3. Declaration
4.Initialization
var var1 = "Pritesh"; Above variable can store value of type -
1.Integer
2.String
3.Any Type
4.None of these
var var1 = "Pritesh"; Above variable can store value of type -
1.Integer
2.String
3.Any Type
4.None of These
Variable can hold ________ value at a time.
1. Multiple
2.Double
3.Single
4.None of These
Variable name contain following type of characters - 1. Alphabet 2. Digits 3. Underscore 4. Special Characters Select the correct option.
1.3 4 2
2.4 3 1
3.1 2 3 4
4.1 2 3
We can declare all type of variables in JavaScript with the keyword __________
1.var
2.obj
3.jvar
4.None of these
We can declare all type of variables in JavaScript with the keyword _____________.
1. var
2.obj
3.jvar
4.None of These
We can declare ___________ at a time. Select most appropriate option.
1.One Variable Only
2.One or more Variables
3.More than One Variables
4.None of these
We use _______ style comment to prevent showing Java Script as Content in the old browsers.
1.JS
2.CSS
3.HTML
4.C
What will be printed ? <html> <head> <title>A Simple Page</title> <script language="JavaScript"> <!-- var A = "Compile ", B = "Error"; C = A + B; alert(C); // --> </script> </head> <body></body> </html>
1."Compile Error" will be printed
2."Compile" will be printed
3.Nothing will be printed
4.None of the above
What will be printed inside webpage ? var message="Hello JS"; document.write(Message);
1.It will crash browser since No Error handler is provided
2.Hello JS
3."Hello JS" will be printed multiple times
4.Nothing Will be printed because Code is not error free
What will be the Output of the below Code ? <html> <body> <script type="text/javascript"> <!-- document.print("Hello"); //--> </script> </body> </html>
1.Will Throw Error
2.Hello
3.Will not print anything because of Comment
4.None of These
What will be the value of Variable 'output' ? var str = "Str"; var num = 10; var output = str + num;
1.Nothing will be printed
2.Str10
3.Null
4.NaN
Which attribute is used to specifies that the script is executed when the page has finished parsing (only for external scripts) ?
1. type
2.defer
3.async
4. parse
Which built-in method returns the calling string value converted to upper case?
1. toUpperCase()
2.toUpperCase()
3.changeCase(case)
4.None of the above
Which JavaScript variable cannot be used as First character but can be use after first character ?
1.Asterisk
2.Dollar Sign
3.Underscore
4.Digit
Which of the following Attribute is used to include External JS code inside your HTML Document ?
1.link
2.script
3.ext
4.ext
Which of the following function of Array object removes the first element from an array and returns that element?
1.reverse()
2. shift()
3. slice()
4.some()
Which of the following function of Number object returns the number's value?
1. toString()
2.valueOf()
3.toLocaleString()
4.toPrecision()
Which of the following function of String object causes a string to be displayed as struck-out text, as if it were in a strike tag?
1.sup()
2.small
3.strike()
4. sub()
Which of the following function of String object creates an HTML anchor that is used as a hypertext target?
1.anchor()
2.link()
3.blink()
4.big()
Which of the following function of String object returns a number indicating the Unicode value of the character at the given index?
1. charAt()
2.charCodeAt()
3.concat()
4.indexOf()
Which of the following function of String object returns the calling string value converted to upper case while respecting the current locale?
1.toLocaleUpperCase()
2. toUpperCase()
3. toString()
4.substring()
Which of the following function of String object returns the index within the calling String object of the first occurrence of the specified value?
1.substr()
2.search()
3.lastIndexOf()
4.indexOf()
Which of the following is a server-side Java Script object?
1.Function
2.File
3.FileUpload
4.Date
Which of the following is considered as End of Single line comment ?
1.End of Line
2.Semicolon
3.End of Statement
4."*/" Symbol
Which of the following is correct about JavaScript?
1.JavaScript is a lightweight, interpreted programming language.
2.JavaScript has object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages.
3.The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers.
4.All of the above
Which of the following is the correct syntax to print a page using JavaScript?
1.window.print();
2.browser.print();
3.navigator.print();
4.document.print();
Which of the following is the correct syntax to redirect a url using JavaScript?
1.document.location='http://www.newlocation.com';
2.browser.location='http://www.newlocation.com';
3. navigator.location='http://www.newlocation.com';
4.window.location='http://www.newlocation.com';
Which of the following is true about variable naming conventions in JavaScript?
1.You should not use any of the JavaScript reserved keyword as variable name.
2.JavaScript variable names should not start with a numeral (0-9).
3.Both of the above.
4.None of These
Which of the following statement is used to declare variable in JavaScript ?
1.Assignment Statement
2.Conditional Statement
3.Executable Statement
4.Declaration Statement
Which of the following type of variable is visible only within a function where it is defined?
1. global variable
2. local variable
3. Both of the above.
4.None of the above
Which of the statement will be neglected by Browser ?
1.<p>Google</p>
2.<p>Yahoo</p>
3.<h1>Heading</h1>
4.All Statements
Which was the first browser to support JavaScript ?
1.Mozilla Firefox
2.Google Chrome
3.IE
4.Netscape
Why JavaScript is called as Lightweight Programming Language ?
1.because JS is available free of cost
2.because JS is client side scripting
3.because we can add programming functionality inside JS
4.because JS can provide programming functionality inside but up to certain extend
______ attribute is used to specify the character encoding used in an external script file.
1.type
2.charset
3.character
4.None of These
____________ is used to assign value to the variable.
1.Assignment Statement in JavaScript
2.Declaration Statement
3.Conditional Statement
4.Executable Statement