Skip to content

Commit db313c8

Browse files
committed
Change variable name in name prompt example
So that it doesn't clash with the magic browser variable 'name'
1 parent d1c0771 commit db313c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

02_program_structure.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,9 @@ To reflect this, the test appears after the body of the loop:
550550
[source,javascript]
551551
----
552552
do {
553-
var name = prompt("Who are you?");
554-
} while (!name);
555-
console.log(name);
553+
var yourName = prompt("Who are you?");
554+
} while (!yourName);
555+
console.log(yourName);
556556
----
557557

558558
(((Boolean,conversion to)))(((! operator)))This program will

0 commit comments

Comments
 (0)