logo Practice-It logo

fixErrors3

Language/Type: JavaScript basics errors functions
Author: Melissa Medsker-Galloway (on 2016/11/18)

The following program attempts to print a full name given a first name and last name as parameters. The last name should be printed in full, starting with a capital letter and followed by all lowercase letters. A comma and the capitalized first name initial should then follow. For example, the call printName("Abby", "Stepp") should output "Stepp, A." to the console. The initial code contains several kinds of errors. Fix the code below so that it compiles and runs properly.

Type your solution here:


This is a function problem. Write a JavaScript function as described. Do not write a complete program; just the function(s) above.

You must log in before you can solve this problem.


Log In

If you do not understand how to solve a problem or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect problems/tests, etc.), please

Is there a problem? Contact a site administrator.