test-console-table.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE HTML>
  2. <html dir="ltr" lang="en">
  3. <head>
  4. <meta charset="utf8">
  5. <!--
  6. - Any copyright is dedicated to the Public Domain.
  7. - http://creativecommons.org/publicdomain/zero/1.0/
  8. -->
  9. <title>Test for Bug 899753 - console.table support</title>
  10. <script>
  11. var languages1 = [
  12. { name: "JavaScript", fileExtension: [".js"] },
  13. { name: { a: "TypeScript" }, fileExtension: ".ts" },
  14. { name: "CoffeeScript", fileExtension: ".coffee" }
  15. ];
  16. var languages2 = {
  17. csharp: { name: "C#", paradigm: "object-oriented" },
  18. fsharp: { name: "F#", paradigm: "functional" }
  19. };
  20. function Person(firstName, lastName, age)
  21. {
  22. this.firstName = firstName;
  23. this.lastName = lastName;
  24. this.age = age;
  25. }
  26. var family = {};
  27. family.mother = new Person("Susan", "Doyle", 32);
  28. family.father = new Person("John", "Doyle", 33);
  29. family.daughter = new Person("Lily", "Doyle", 5);
  30. family.son = new Person("Mike", "Doyle", 8);
  31. var myMap = new Map();
  32. myMap.set("a string", "value associated with 'a string'");
  33. myMap.set(5, "value associated with 5");
  34. var mySet = new Set();
  35. mySet.add(1);
  36. mySet.add(5);
  37. mySet.add("some text");
  38. mySet.add(null);
  39. mySet.add(undefined);
  40. // These are globals and so won't be reclaimed by the GC.
  41. var bunnies = new String("bunnies");
  42. var lizards = new String("lizards");
  43. var weakmap = new WeakMap();
  44. weakmap.set(bunnies, 23);
  45. weakmap.set(lizards, "oh no");
  46. var weakset = new WeakSet([bunnies, lizards]);
  47. </script>
  48. </head>
  49. <body>
  50. <p>Hello world!</p>
  51. </body>
  52. </html>