0

Can anyone help trouble shoot my problem

so im trying to do a simple user input name saving if statement and the app is telling me im missing a ) in line 7 at the end of my code and im like where is the problem cuz my code looks fine too me var user= prompt("Please provide name for your charater"); var cfm= confirm("Do want to use this name?"); if (cfm==true) { alert('Ok '+user ' is now your charater name') /* this is line 7 btw */ }

5th Aug 2018, 7:29 AM
Wilde Night
Wilde Night - avatar
2 Respostas
+ 10
Add a plus (+) sign after 'user' in alert. After fixing ~ alert('Ok '+user + ' is now your charater name')
5th Aug 2018, 7:40 AM
Nikhil
Nikhil - avatar
+ 1
wow thx how did i not see that i know better lol thx again
5th Aug 2018, 9:23 AM
Wilde Night
Wilde Night - avatar