Skip to content

Instantly share code, notes, and snippets.

@samarpanda
Last active December 16, 2015 17:41
Show Gist options
  • Select an option

  • Save samarpanda/1dfc3c7cecaeaa55229d to your computer and use it in GitHub Desktop.

Select an option

Save samarpanda/1dfc3c7cecaeaa55229d to your computer and use it in GitHub Desktop.

Questions and answers

  1. Difference between SVG and Canvas? Explanation
  2. Difference between Flash and Canvas?
  3. In depth study of @media queries
  4. Explain cascading in CSS - CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.
  5. Comparision of browsers like Chrome, Firefox, Internet explorer, Safari etc. Wikipedia link
  6. Chrome: Layout rendering engine - Webkit. Jscript engine - V8
  7. Firefox: Layout rendering engine - Gecko. Jscript engine - Spider monkey
  8. Internet explorer: Layout rendering engine - Trident. Jscript engine - Chakra
  9. Safari - Layour rendering engine - Webkit. Jscript engine - JavascriptCore i.e Nitro
  10. Acid3 test is a web test page from the Web Standards Project that checks a web browser's compliance with elements of various web standards, particularly the Document Object Model (DOM) and JavaScript. Wikidedia link for acid3 test
  11. Browser speed test - Sunspider speed test, speed battle
  12. Ecmascript - ECMAScript is the scripting language standardized by Ecma International in the ECMA-262 specification and ISO/IEC 16262. The language is widely used for client-side scripting on the web, in the form of several well-known dialects such as JavaScript, JScript and ActionScript.

CSS

  1. Browser hacks
  2. CSS Specificity, what is cascading of css?
  3. Media queries
  4. Css counters used to display counters for list and sections. more links
  5. Comparision between Adaptive and Responsive css?
  6. Handle white-space property in css. Default parameter white-space:normal. Detailed explanation: css tricks link, mdn link
  7. Difference between <code> and <pre> tags. unlike other tags <pre> tag preserves line breaks and spaces.

Amazon Questions

  1. What is the default property of position? A: static

  2. What is the difference between static and relative position element? Static VS Relative position

  3. What is first-class function? A: first-class function

  4. How is JSON different from XML?

  5. Box model
    Box model: css tricks link
    Box-sizing mdn link
    Box-sizing

  6. What is the width of the child div element which is wrapped inside another div element having width as 300px. Inner div has margin of 10px, border 5px and padding of 10px.

Javascript

  1. Explain call and apply. And how are they different?

  2. What is prototype?

  3. Three disadvantages of jQuery?

  4. CORS over JSONP - Detailed mdn description here

  5. AJAX

  6. Javascript Data Types

    • Primitive (Primary) Data types : String, Number, Boolean
    • Composite Data types : Array, Object
    • Special Data types : null, undefined
  7. What is event bubbling?

  8. How these properties are different e.preventDefault, e.stopPropagation and return false?

    • return false from within jQuery event handler is same as calling both e.stopPropagation and e.preventDefault. This behaviour differ in normal (non-jQuery) event handlers, in which notably return false doesn't stop the event from bubbling up.
    • e.preventDefault prevents from default browser event to be occured.
    • e.stopPropagation prevent event from bubbling up.
  9. stopImmediatePropagation - Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.

  10. Name few http-headers?

  11. How can you restrict javascript to set / get cookies?

    if(!document.__defineGetter__){
      Object.defineProperty(document, 'cookie', {
        get: function(){ return ''; },
        set: function(){ return true; }
      });
    } else {
      document.__defineGetter__("cookie", function(){ return '';} );
      document.__defineSetter__("cookie", function(){} );
    }
  12. Any Event which doesn't bubble up the DOM tree? A: Error Event.

DOM

  1. Crash course how DOM event works Capture and bubble phase
  2. What is createDocumentFragment? And how is it useful? Answer: It is quite performant to use createDocumentFragment while inserting elements to DOM. Details follow the link. Implementation example1

Html

  1. What is the difference between <code> and <pre>? Answer: <pre> tag preserves spaces and line breaks.
  2. Which one should be used among these <strong>,<b>,<i> and <em> and why? Answer: <strong> and <em> are more semantically correct with respect to <i> and <em>.

Others

  1. Describe everything that happens from the time you hit enter, to the time your browser receives a response.
@samarpanda

Copy link
Copy Markdown
Author

Including link to previous discussion!

@samarpanda

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment