Answer to Question #227790 in HTML/JavaScript Web Application for Praise

Question #227790

Write a javascript program that asks the user to enter his or her first name and then last name, and then constructs, stores, and displays a third string consisting of the user’s last name followed by a comma, a space, and first name. Use string objects and methods from the string header file. A sample run could look like this: Enter your first name: Paul Enter your last name: Smith Here’s the information in a single string: Smith, Paul 


1
Expert's answer
2021-08-20T01:09:37-0400
//corecudr
var firstName = prompt("Please enter your first name");
var lastName = prompt("Please enter your last name");
var output = lastName + ', ' + firstName;
alert(output);

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS