blob: b8b877f1f7c5f7c90fde87f0c60bb1fbed06ea57 [file] [log] [blame]
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 13.6.7
description: Completion value when expression is false without an `else` clause
info: >
IfStatement : if ( Expression ) Statement
[...]
4. If exprValue is false, then
a. Return NormalCompletion(undefined).
---*/
assert.sameValue(eval('1; if (false) { }'), undefined);
assert.sameValue(eval('2; if (false) { 3; }'), undefined);