To simplify my question using the statement below, how can I have my javascript always print to console what the user typed?
A blip from my code
if (userTyped === 'getname '+ variable) {
Where 'variable' will always equal whatever last half of the string they typed. For example, if a user types "getname 398502" then log it to the console, or if a user types "getname 598024" then log that to the console.
So as long as they typed 'getname ' then print all of what they typed.
if (userTyped === 'getname ' + variable) {?