4. Fix me



I fixed the function code, when I run it I get the wanted result in the console log but codeCademy says its false.

var fullName = "";
var name;
var firstLetter;
   fixName function definition should go here.
function fixName(){
    firstLetter = name.substring(0, 1);
name = firstLetter.toUpperCase() + name.substring(1);
fullName = fullName + " " + name;

name = prompt("Enter your first name (all in lower case):");

console.log("And your full name is:" + fullName);


It appears there is some code missing. What about the last name?


thank you for pointing out my mistake :smiley:

it worked !


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.