166k views
5 votes
Assume userName equals "Tom" and userAge equals 22. What is displayed in a dialog box when the following statement is executed? alert(userAge + " \\is " + userName + "'s age.");

User Juls
by
5.7k points

1 Answer

2 votes

Answer:

22

is Tom's age.

Step-by-step explanation:

Since userAge is initialized as 22, 22 will be displayed in a line. Then, since there is a "\\" which means go the new line, the program will display in the new line. is will be displayed. Since userName is initialized as Tom, Tom will be displayed. Then 's age. will be displayed in the same line.

User Rakesh Gondaliya
by
5.7k points