Advertisement
pierrem

JSLint array formatting tests

Nov 15th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. // error messages below from running http://www.jslint.com on 15nov2011 at 20:15
  2.  
  3. /*jslint maxerr: 50, indent: 4 */
  4. var a;
  5. //0 pass
  6. a = ["a",
  7. "b",
  8. "c"
  9. ];
  10. //1 pass
  11. a = ["a",
  12. "b",
  13. "c"
  14. ];
  15. //2 fail
  16. a = ["a",
  17. "b",
  18. "c"
  19. ]; // Problem: Expected ']' at column 5, not column 1.
  20. //3 pass
  21. a = [
  22. "a",
  23. "b",
  24. "c"
  25. ];
  26. //4 fails
  27. a = [
  28. "a",
  29. "b",
  30. "c"
  31. ]; // Problem: Expected ']' at column 1, not column 5.
  32. //5 pass
  33. var a = ["a",
  34. "b",
  35. "c"
  36. ];
  37. //6 fail
  38. var a = [
  39. "a",
  40. "b", // Problem: Expected 'b' at column 9, not column 20.
  41. "c" // Problem: Expected 'c' at column 9, not column 13.
  42. ]; // Problem: Expected ']' at column 5, not column 9.
  43. //7 fail
  44. var a = ["a",
  45. "b",
  46. "c" // Problem: Expected 'c' at column 9, not column 5.
  47. ];
  48. //8 fail
  49. var a = [
  50. "a",
  51. "b", // Problem: Expected 'b' at column 5, not column 20.
  52. "c"
  53. ]; // Problem: Expected ']' at column 1, not column 9.
  54.  
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement