2013-09-01 5 views

Antwort

7

Da

So

typeof (a, b) kehrt typeof b

und in Ihrem Fall

  • typeof (Array, null) ist typeof nullwhich is "object"
  • typeof(null, Array)typeof Array ist, und Array ist eine Funktion.
+0

Warum '(a, b)' zurück b? – 2619

+3

@ 2619 [Komma-Operator] (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator) – Andreas