Created
February 10, 2025 18:59
-
-
Save kevingosse/2bccf2c439a41fc9ffed9167d2492079 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MODULES = new ActiveXObject("Scripting.Dictionary"); | |
var n; // undefined | |
MODULES.Add(n, "Test value"); | |
var keys = new VBArray(MODULES.Keys()).toArray(); | |
WScript.Echo("Array length: " + keys.length); | |
WScript.Echo("Key at index 0: " + (keys[0] === undefined ? "undefined" : keys[0])); | |
WScript.Echo("Is index 0 enumerable? " + (keys.hasOwnProperty(0) ? "Yes" : "No")); | |
WScript.Echo("for-in loop:"); | |
for (var index in keys) { | |
WScript.Echo(" Index: " + index + ", Value: " + keys[index]); | |
} | |
WScript.Echo("end"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment