Skip to content

Commit 00d1051

Browse files
authored
Merge pull request #1710 from mdizo/master
Function return example update
2 parents a4a8408 + e817e10 commit 00d1051

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1-js/02-first-steps/14-function-basics/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ There may be many occurrences of `return` in a single function. For instance:
266266
267267
```js run
268268
function checkAge(age) {
269-
if (age > 18) {
269+
if (age >= 18) {
270270
*!*
271271
return true;
272272
*/!*
@@ -277,7 +277,7 @@ function checkAge(age) {
277277
}
278278
}
279279

280-
let age = prompt('How old are you?', 18);
280+
let ageCheck = prompt('How old are you?', 18);
281281

282282
if ( checkAge(age) ) {
283283
alert( 'Access granted' );

0 commit comments

Comments
 (0)