Skip to content

Instantly share code, notes, and snippets.

@joa
Created August 1, 2014 12:23
Show Gist options
  • Select an option

  • Save joa/129a79422314f7fc22b1 to your computer and use it in GitHub Desktop.

Select an option

Save joa/129a79422314f7fc22b1 to your computer and use it in GitHub Desktop.

Revisions

  1. joa revised this gist Aug 1, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion HTMLOptionElement.js
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    //
    // a) false, true
    // b) true, true
    // c) false, true
    // c) true, false
    // d) none of the above

    console.log(new Option() instanceof HTMLOptionElement)
  2. joa created this gist Aug 1, 2014.
    9 changes: 9 additions & 0 deletions HTMLOptionElement.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // what does the following code print?
    //
    // a) false, true
    // b) true, true
    // c) false, true
    // d) none of the above

    console.log(new Option() instanceof HTMLOptionElement)
    console.log(new HTMLOptionElement() instanceof HTMLOptionElement)