Remove `let` keyword and use `using` declaration (#4403)

This commit is contained in:
Rezvan Mahdavi Hezaveh 2025-02-18 20:54:05 +00:00 committed by GitHub
parent 74788df072
commit 6d5e6c229e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -7,20 +7,20 @@ includes: [compareArray.js]
features: [explicit-resource-management] features: [explicit-resource-management]
---*/ ---*/
// Use using with null -------------- // Use using with null does not throw --------------
let withNullvalues = []; let withNullvalues = [];
(function TestUsingWithNull() { (function TestUsingWithNull() {
let using = null; using x = null;
withNullvalues.push(42); withNullvalues.push(42);
})(); })();
assert.compareArray(withNullvalues, [42]); assert.compareArray(withNullvalues, [42]);
// Use using with undefined -------------- // Use using with undefined does not throw --------------
let withUndefinedvalues = []; let withUndefinedvalues = [];
(function TestUsingWithUndefined() { (function TestUsingWithUndefined() {
let using = undefined; using x = undefined;
withUndefinedvalues.push(42); withUndefinedvalues.push(42);
})(); })();
assert.compareArray(withUndefinedvalues, [42]); assert.compareArray(withUndefinedvalues, [42]);