Skip to content

Commit

Permalink
Fix init values
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell authored and rwaldron committed Jun 10, 2020
1 parent cbea466 commit 5783f55
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Expand Up @@ -14,7 +14,7 @@ features: [logical-assignment-operators]
---*/

var value = 1;
var value = undefined;
value ??= () => {};

assert.sameValue(value.name, "value", "value");
Expand Up @@ -14,7 +14,7 @@ features: [logical-assignment-operators]
---*/

var value = 1;
var value = undefined;
value ??= class {};

assert.sameValue(value.name, "value", "value");
Expand Up @@ -14,7 +14,7 @@ features: [logical-assignment-operators]
---*/

var value = 1;
var value = undefined;
value ??= function() {};

assert.sameValue(value.name, "value", "value");
Expand Up @@ -14,7 +14,7 @@ features: [logical-assignment-operators]
---*/

var value = 1;
var value = 0;
value ||= () => {};

assert.sameValue(value.name, "value", "value");
Expand Up @@ -14,7 +14,7 @@ features: [logical-assignment-operators]
---*/

var value = 1;
var value = 0;
value ||= class {};

assert.sameValue(value.name, "value", "value");
Expand Up @@ -14,7 +14,7 @@ features: [logical-assignment-operators]
---*/

var value = 1;
var value = 0;
value ||= function() {};

assert.sameValue(value.name, "value", "value");

0 comments on commit 5783f55

Please sign in to comment.