I don't think I'm fully grasping how this works (I'm a little embarrassed...by a little I mean a lot). Basically this is supposed to create a prompt and write console.log fullName with the first two letters in each prompt to be capitalized and concatenate together. Please help!
var fullName = ""; //Why does fullName have to be defined as a string? and when it's removed it doubles the value? var name; var firstLetter; var fixName = function () { firstLetter = name.substring(0, 1); name = firstLetter.toUpperCase() + name.substring(1); fullName = fullName + " " + name; //what exactly is happening here under the fullName variable? What value is passing into fullName after it's being called? } name = prompt("Enter your first name (all in lower case):"); fixName(); name = prompt("Enter your second name (all in lower case):"); fixName(); console.log("And your fullname is:" + fullName);