symbolFor.js 794 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. var y = Symbol.for('bob');
  6. WScript.SetTimeout(testFunction, 50);
  7. /////////////////
  8. function testFunction()
  9. {
  10. var x = Symbol.for('ted');
  11. var z = Symbol.for('bob');
  12. telemetryLog(`x === y: ${x === y}`, true); //false
  13. telemetryLog(`z === y: ${z === y}`, true); //true
  14. var zo = Symbol('bob');
  15. telemetryLog(`zo === y: ${zo === y}`, true); //false
  16. emitTTDLog(ttdLogURI);
  17. }