Interview Questions For JavaScript

331 Questions | Attempts: 179
Share
SettingsSettings
Please wait...
  • 1/331 Questions

    Java Script File Has An Extension Of

    • .Java
    • .Js
    • .javascript
    • .xml
Please wait...

Quiz Preview

  • 2. 

    Which Of The Dialog Box Display a Message And a Data Entry Field

    • Alert()

    • Prompt()

    • Confirm()

    • Msg()

    Correct Answer
    A. Prompt()
  • 3. 

    Method Prompt() Contain ........Number of Parameters

    • One

    • Two

    • Three

    • Zero

    Correct Answer
    A. Two
  • 4. 

    A Function Associated With An object is Called

    • Function

    • Method

    • Link

    • None

    Correct Answer
    A. Method
  • 5. 

    What is the correct JavaScript syntax to write "Hello World"?

    • Response.write("Hello World")

    • Document.write("Hello World")

    • ("Hello World")

    • Echo("Hello World")

    Correct Answer
    A. Document.write("Hello World")
  • 6. 

    How do you call a function named "myFunction"?

    • Call myFunction()

    • MyFunction()

    • Call function myFunction

    Correct Answer
    A. MyFunction()
  • 7. 

    How do you write a conditional statement for executing some statements only if "i" is equal to 5?

    • If i==5 then

    • If i=5 then

    • If (i==5)

    • If i=5

    Correct Answer
    A. If (i==5)
  • 8. 

    How does a "for" loop start?

    • For (i = 0; i

    • For (i = 0; i

    • For i = 1 to 5

    • For (i

    Correct Answer
    A. For (i = 0; i
  • 9. 

    What is the correct way to write a JavaScript array?

    • Var txt = new Array("tim","shaq","kobe")

    • Var txt = new Array="tim","shaq","kobe"

    • Var txt = new Array(1:"tim",2:"shaq",3:"kobe")

    Correct Answer
    A. Var txt = new Array("tim","shaq","kobe")
  • 10. 

    You define an array using

    • Var myarray = new Array();

    • Var myarray = array new;

    • Var new Array() = myarray;

    • Var new array = myarray;

    Correct Answer
    A. Var myarray = new Array();
  • 11. 

    How do you round the number 8.25, to the nearest whole number?

    • Math.rnd(8.25)

    • Math.round(8.25)

    • Round(8.25)

    • Rnd(8.25)

    Correct Answer
    A. Math.round(8.25)
  • 12. 

    CHow do you find the largest number of 6 and 8?

    • Math.max(6,8)

    • Top(6,8)

    • Ceil(6,8)

    • Math.ceil(6,8)

    Correct Answer
    A. Math.max(6,8)
  • 13. 

    Which property would you use to redirect visitor to another page?

    • Window.location.href

    • Document.href

    • Java.redirect.url

    • Link.redirect.href

    Correct Answer
    A. Window.location.href
  • 14. 

    What is the correct JavaScript syntax to write "Hello World"?

    • Response.write("Hello World")

    • Document.write("Hello World")

    • ("Hello World")

    • Echo("Hello World")

    Correct Answer
    A. Document.write("Hello World")
  • 15. 

    How do you call a function named "myFunction"?

    • Call myFunction()

    • MyFunction()

    • Call function myFunction

    Correct Answer
    A. MyFunction()
  • 16. 

    How do you write a conditional statement for executing some statements only if "i" is equal to 5?

    • If i==5 then

    • If i=5 then

    • If (i==5)

    • If i=5

    Correct Answer
    A. If (i==5)
  • 17. 

    How many different kind of loops are there in JavaScript?

    • Two. The "for" loop and the "while" loop

    • Four. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop

    • One. The "for" loop

    Correct Answer
    A. Two. The "for" loop and the "while" loop
  • 18. 

    How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?

    • If (i 5)

    • If (i != 5)

    • If =! 5 then

    • If 5

    Correct Answer
    A. If (i != 5)
  • 19. 

    How does a "for" loop start?

    • For (i = 0; i

    • For (i = 0; i

    • For i = 1 to 5

    • For (i

    Correct Answer
    A. For (i = 0; i
  • 20. 

    What is the correct way to write a JavaScript array?

    • Var txt = new Array("tim","shaq","kobe")

    • Var txt = new Array="tim","shaq","kobe"

    • Var txt = new Array(1:"tim",2:"shaq",3:"kobe")

    Correct Answer
    A. Var txt = new Array("tim","shaq","kobe")
  • 21. 

    Onclick is equivalent to which two events in sequence

    • Onmouseover and onmousedown

    • Onmousedown and onmouseout

    • Onmousedown and onmouseup

    • Onmouseup and onmouseout

    Correct Answer
    A. Onmousedown and onmouseup
  • 22. 

    You define an array using

    • Var myarray = new Array();

    • Var myarray = array new;

    • Var new Array() = myarray;

    • Var new array = myarray;

    Correct Answer
    A. Var myarray = new Array();
  • 23. 

    How do you round the number 8.25, to the nearest whole number?

    • Math.rnd(8.25)

    • Math.round(8.25)

    • Round(8.25)

    • Rnd(8.25)

    Correct Answer
    A. Math.round(8.25)
  • 24. 

    CHow do you find the largest number of 6 and 8?

    • Math.max(6,8)

    • Top(6,8)

    • Ceil(6,8)

    • Math.ceil(6,8)

    Correct Answer
    A. Math.max(6,8)
  • 25. 

    How do you find the client's browser name?

    • Navigator.appName

    • Client.navName

    • Browser.name

    Correct Answer
    A. Navigator.appName
  • 26. 

    What is the correct JavaScript syntax for opening a new window called "window5" ?

    • New("http://www.ex-designz.net","window5")

    • Window.open("http://www.ex-designz.net","window5")

    • Open.newwindow("http://www.ex-designz.net","window5")

    • New.window("http://www.ex-designz.net","window5")

    Correct Answer
    A. Window.open("http://www.ex-designz.net","window5")
  • 27. 

    How do you put a message in the browser's status bar?

    • Window.status = "put your message here"

    • Statusbar = "put your message here"

    • Status("put your message here")

    • Window.status("put your message here")

    Correct Answer
    A. Window.status = "put your message here"
  • 28. 

    Which property would you use to redirect visitor to another page?

    • Window.location.href

    • Document.href

    • Java.redirect.url

    • Link.redirect.href

    Correct Answer
    A. Window.location.href
  • 29. 

    What is the correct JavaScript syntax to write "Hello World"?

    • Response.write("Hello World")

    • Document.write("Hello World")

    • ("Hello World")

    • Echo("Hello World")

    Correct Answer
    A. Document.write("Hello World")
  • 30. 

    How do you call a function named "myFunction"?

    • Call myFunction()

    • MyFunction()

    • Call function myFunction

    Correct Answer
    A. MyFunction()
  • 31. 

    How do you write a conditional statement for executing some statements only if "i" is equal to 5?

    • If i==5 then

    • If i=5 then

    • If (i==5)

    • If i=5

    Correct Answer
    A. If (i==5)
  • 32. 

    How many different kind of loops are there in JavaScript?

    • Two. The "for" loop and the "while" loop

    • Four. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop

    • One. The "for" loop

    Correct Answer
    A. Two. The "for" loop and the "while" loop
  • 33. 

    How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?

    • If (i 5)

    • If (i != 5)

    • If =! 5 then

    • If 5

    Correct Answer
    A. If (i != 5)
  • 34. 

    How does a "for" loop start?

    • For (i = 0; i

    • For (i = 0; i

    • For i = 1 to 5

    • For (i

    Correct Answer
    A. For (i = 0; i
  • 35. 

    What is the correct way to write a JavaScript array?

    • Var txt = new Array("tim","shaq","kobe")

    • Var txt = new Array="tim","shaq","kobe"

    • Var txt = new Array(1:"tim",2:"shaq",3:"kobe")

    Correct Answer
    A. Var txt = new Array("tim","shaq","kobe")
  • 36. 

    Onclick is equivalent to which two events in sequence

    • Onmouseover and onmousedown

    • Onmousedown and onmouseout

    • Onmousedown and onmouseup

    • Onmouseup and onmouseout

    Correct Answer
    A. Onmousedown and onmouseup
  • 37. 

    You define an array using

    • Var myarray = new Array();

    • Var myarray = array new;

    • Var new Array() = myarray;

    • Var new array = myarray;

    Correct Answer
    A. Var myarray = new Array();
  • 38. 

    How do you round the number 8.25, to the nearest whole number?

    • Math.rnd(8.25)

    • Math.round(8.25)

    • Round(8.25)

    • Rnd(8.25)

    Correct Answer
    A. Math.round(8.25)
  • 39. 

    CHow do you find the largest number of 6 and 8?

    • Math.max(6,8)

    • Top(6,8)

    • Ceil(6,8)

    • Math.ceil(6,8)

    Correct Answer
    A. Math.max(6,8)
  • 40. 

    How do you find the client's browser name?

    • Navigator.appName

    • Client.navName

    • Browser.name

    Correct Answer
    A. Navigator.appName
  • 41. 

    What is the correct JavaScript syntax for opening a new window called "window5" ?

    • New("http://www.ex-designz.net","window5")

    • Window.open("http://www.ex-designz.net","window5")

    • Open.newwindow("http://www.ex-designz.net","window5")

    • New.window("http://www.ex-designz.net","window5")

    Correct Answer
    A. Window.open("http://www.ex-designz.net","window5")
  • 42. 

    How do you put a message in the browser's status bar?

    • Window.status = "put your message here"

    • Statusbar = "put your message here"

    • Status("put your message here")

    • Window.status("put your message here")

    Correct Answer
    A. Window.status = "put your message here"
  • 43. 

    Which property would you use to redirect visitor to another page?

    • Window.location.href

    • Document.href

    • Java.redirect.url

    • Link.redirect.href

    Correct Answer
    A. Window.location.href
  • 44. 

    How do you put a message in the browser's status bar?

    • Window.status = "put your message here"

    • Statusbar = "put your message here"

    • Status("put your message here")

    • Window.status("put your message here")

    Correct Answer
    A. Window.status = "put your message here"
  • 45. 

    The Tag is used To Give Heading To The Table

    • Head

    • Td

    • Th

    • Caption

    Correct Answer
    A. Caption
  • 46. 

    IsNaN() Evalutes And Argument To Determine if Given Value

    • Is Not a Null

    • Is Not a Number

    • Is Not a New Object

    • None Of The Above

    Correct Answer
    A. Is Not a Number
  • 47. 

    Function is Used To Parse a String To Int

    • Integer.Parse

    • Int.Parse

    • Parse.Int

    • None

    Correct Answer
    A. Int.Parse
  • 48. 

    GetMonth() returns The Month as

    • Int

    • Float

    • Char

    • String

    Correct Answer
    A. Int
  • 49. 

    If Button is clicked .......Event Handler is invoked

    • OnSubmit()

    • OnLoad()

    • IsPostBack()

    • Onclick()

    Correct Answer
    A. Onclick()

Quiz Review Timeline (Updated): Mar 21, 2022 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 27, 2017
    Quiz Created by
    Er.lokesh
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.