recursive_inline2.js 562 B

123456789101112131415161718192021
  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. var obj = {get x(){return 2;}};
  6. function a()
  7. {
  8. }
  9. function b()
  10. {
  11. }
  12. function foo(x, y)
  13. {
  14. if(y == 0) return;
  15. x();
  16. foo(b, --y);
  17. }
  18. foo(a,4);
  19. WScript.Echo("PASSED");