4. Fix me

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/en/courses/functions-in-javascript-2-0/0/4#

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
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):”);
fixName();

console.log(β€œAnd your full name is:” + fullName);

<do not remove the three backticks above>

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

thank you for pointing out my mistake :smiley:

it worked !

1 Like

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