+ 1
how do I alert something like this?: Hi(user) niceto meet you in javascript?
I don't now how to alert Hi(user)Nice to meet you in the same alert box
4 odpowiedzi
+ 4
alert("Hi " + user + " nice to meet you")
or in ES6 or above:
alert(`Hi ${user} nice to meet you`)
+ 1
var a =" joseph ";
alert("hi"+a+"nice to meet you");
+ 1
In java script, yes we can use alert() function.
Other wise use div tag in the page to display alert message to the user.
0
thanks Here is my result after testing!
https://code.sololearn.com/WZCmdYx88faY/?ref=app