Skip to content

Commit cf99921

Browse files
authored
fix: Swap const for let in the short-circuiting section (#7)
An update was done to the scripts and all `var` become `conts`. But in one section that creates some wrong code because the variable is subsequently assigned a value based on an `if` statement. So this update uses `let` for that one example.
1 parent eaaa9fb commit cf99921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ <h3>
474474

475475
<h4 class="not-recommended">Not Recommended:</h4>
476476
<pre><code class="not-recommended">const foo = (name) => {
477-
const theName;
477+
let theName;
478478
if (name) {
479479
theName = name;
480480
} else {

0 commit comments

Comments
 (0)