equal.js 774 B

12345678910111213141516171819
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. function write(v) { WScript.Echo(v + ""); }
  6. function foo() {}
  7. var all = [ 0, 10.2, 1, -10, "1",
  8. "hello", undefined, true,false, new Array(10),
  9. null, Number.MAX_VALUE, Number.POSITIVE_INFINITY
  10. ];
  11. for (var i=0; i<all.length; ++i) {
  12. for (var j=0; j<all.length; ++j) {
  13. write("a[" + i + "] == a[" + j + "] = " + (all[i] == all[j]));
  14. }
  15. }