SemiCollonAfterBlockEs5.js 690 B

12345678910111213141516171819202122232425
  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(a) {
  6. if (this.WScript == undefined) {
  7. document.write(a);
  8. document.write("</br>");
  9. }
  10. else
  11. WScript.Echo(a)
  12. }
  13. try
  14. {
  15. // this should not compile in ES5
  16. eval("if(true){};else{}");
  17. }
  18. catch(e)
  19. {
  20. write("'if(true){};else{}' compile failure in ES5" + e)
  21. }