Test case details

Preparation Code

<script>   var a = [];   var f = function() {};   var x;   var slit = "i am literal string";   var sobj = new String("i am a string object");   var toString = Object.prototype.toString; </script>

Test cases

Test #1

x = a instanceof Array;

Test #2

x = a != null && a.constructor === Array

Test #3

x = f instanceof Function;

Test #4

x = f.constructor === Function;

Test #5

x = toString.call(slit) == '[object String]'; y = toString.call(sobj) == '[object String]';

Test #6

x = slit instanceof String; y = sobj instanceof String;

Test #7

x = typeof slit == 'string'; y = typeof sobj == 'string';

Test #8

x = typeof f == 'function';

Test #9

x = toString.call(slit) == '[object Function]';