JavaScript

  1. window.onload and onDocumentReady
    • the whole set of docs inlcuding css and images.
    • DocumentOnReady is when the DOM object is ready
  2. == and ===
    checks for value equality and type equality.
  3. undefined value and null.
    A value that has not been assigned and null value is the value that has been assigned and is null.
  4. How do you change the style/class on any element?
    • document.getElementById(“myText”).className = “anyclass”
    • document.getElementById(“myText”).style.fontSize = “20″
  5. what is closure in javascript?
    • A closure is the local variables for a function – kept alive after the function has returned,
    • Closures reduce the need to pass state around the application.
  6. What datatypes are used in javascript?
    Number, String, Undefined, null, Boolean
  7. What is the difference between innerHTML and append() in JavaScript?
    • InnerHTML is not standard, and its a String. It is faster and less versbose.
    • Dom is not a stringĀ 
Author
Anonymous
ID
179819
Card Set
JavaScript
Description
Interview javascript
Updated