logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is Javascript namespacing? How and where is it used?


  • Correct Answer
  • Using global variables in Javascript is evil and a bad practice That being said, namespacing is used to bundle up all your functionality using a unique name In JavaScript, a namespace is really just an object that you?ve attached all further methods, properties and objects It promotes modularity and code reuse in the application 


  • Technology problems


    Search Results


    • 1. How JavaScript timers work? What is a drawback of JavaScript timers?
    • Discuss
    • 2. Are javascript and jQuery different?
    • Discuss
    • 3. Does javascript have the concept level scope?
    • Discuss
    • 4. How do you create a new object in JavaScript?
    • Discuss
    • 5. What is the difference between an alert box and a confirmation box?
    • Discuss
    • 6. What are the different objects used in JavaScripts?
    • Discuss
    • 7. What does window.history object?
    • Discuss
    • 8. Which of the following is added to prefs.js,when open a dialog box each time an error occurs?

    • Options
    • A. user_pref("javascript.classic.error_alerts", true);
    • B. user_pref("javascript.classic.error_alerts ", false);
    • C. user_pref("javascript.console.open_on_error ", false);
    • D. user_pref("javascript.console.open_on_error ", true);
    • Discuss
    • 9. Which of the following navigator object properties is the same in both Netscape and IE?

    • Options
    • A. navigator.appCodeName
    • B. navigator.appName
    • C. navigator.appVersion
    • D. None of the above
    • Discuss
    • 10. What is mean by "this" keyword in javascript?

    • Options
    • A. It refers current object
    • B. It referes previous object
    • C. It is variable which contains value
    • D. None of the above
    • Discuss


    Comments

    There are no comments.

Enter a new Comment