deferredWith2.js 684 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. // -version:2 -forcedeferparse
  6. function test0(x) {
  7. with (x)
  8. {
  9. z = "4";
  10. };
  11. return x;
  12. };
  13. var p={o:1, z:2};
  14. WScript.Echo("p = " + JSON.stringify(p));
  15. var k=test0(p);
  16. WScript.Echo("k = " + JSON.stringify(k));
  17. WScript.Echo("k.z = " + k.z);
  18. WScript.Echo("k.z+1 = " + k.z+1);