NoSse.js 762 B

1234567891011121314151617181920212223242526272829303132
  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 test0(a) {
  6. return a + 1.1;
  7. }
  8. echo(test0(1.1));
  9. function test1() {
  10. return Math.sin(1.1) + 1.1;
  11. }
  12. echo(test1());
  13. function test2(a) {
  14. a[0] = 1.1;
  15. }
  16. var a = new Float64Array(1);
  17. test2(a);
  18. echo(a[0]);
  19. function test3(a) {
  20. return a | 0;
  21. }
  22. echo(test3(1.1));
  23. echo(Math.abs(-1.1));
  24. function echo(n) {
  25. WScript.Echo(Math.round(n * 100));
  26. }