+ 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

4th May 2020, 3:28 AM
Truong Minh An
Truong Minh An - avatar
4 odpowiedzi
+ 4
alert("Hi " + user + " nice to meet you") or in ES6 or above: alert(`Hi ${user} nice to meet you`)
4th May 2020, 3:33 AM
Kevin ★
+ 1
var a =" joseph "; alert("hi"+a+"nice to meet you");
4th May 2020, 3:34 AM
Youssef Radid
Youssef Radid - avatar
+ 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.
4th May 2020, 3:42 AM
Dasarath Singh
0
thanks Here is my result after testing! https://code.sololearn.com/WZCmdYx88faY/?ref=app
4th May 2020, 3:45 AM
Truong Minh An
Truong Minh An - avatar