Wednesday, June 18, 2014

Java script questions for experience

Javascript interview question with jquery question


Javascript:

  1. OOP’s feature supported by Javascript.
  2. Difference between Global Variable and Local Storage.
  3. Data Encapsulation. Example?
  4. Polymorphism. Example?
  5. Data Abstraction. Example?
  6. Prototype. Example?
  7. Inheritance. Example?
  8. How can we add a member to a class in runtime? Example?
  9. Why is Javascript a scripting language?
  10. Difference between method and function.
  11. Difference between variable and property.
  12. Basic Javascript Datatype.
  13. Javascript Constructors. Write an example?
  14. What is ajax?
  15. What are the states/lifecycle of ajax?
  16. Ajax status?
  17. Difference between synchronous and asynchronous Ajax?
  18. Javascript implementation of Ajax?
  19. Difference between post/get?


JQuery:

  1. Difference between preventDefault() and return false().
  2. Difference between call() and apply().
  3. Difference between stopPropogation() and stopImmediatePropogation().
  4. What is Chaining? What is the advantage of Chaining?
  5. How do we cache DOM elements for faster access?
  6. How can we load 2 separate versions of JQuery in the same project?
  7. What does $ signify?
  8. What can we use instead of $?
  9. How can we use user defined keyword instead of $? Why was this feature introduce?
  10. Difference between onload and document.ready?
  11. Why do we need document.ready?
  12. If I don’t want to use document.ready/onload. What would be the alternative?
  13. Can we use multiple document.ready. If yes, how will it be executed?
  14. Is it possible to hold or delay the execution for document.ready for sometime, how? (Suppose if I want some plugin to load before document.ready)
  15. Difference between this and $(this)?
  16. Difference between .empty(), .remove(), .detach().
  17. Difference between bind(), live(), on(), delegate()
  18. How do we clone an object in jquery.
  19. Does events gets copied when you clone an object. If no, then how do we ensure it does?
  20. Different ajax methods of JQuery. Explain each method?

·         load() : Load a piece of html into a container DOM
·         $.getJSON(): Load JSON with GET method.
·         $.getScript(): Load a JavaScript file.
·         $.get(): Use to make a GET call and play extensively with the response.
·         $.post(): Use to make a POST call and don't want to load the response to some container DOM.
·         $.ajax(): Use this to do something on XHR failures, or to specify ajax options (e.g. cache: true) on the fly.


CSS
New Features in CSS3?
Example of @media