Hey can someone take a look at this. Trying to figure out why memory
is updating. When I call function 'plus'
memory should update. But then when I don't call function 'plus'
, it still updates. Been stumped on it for a while now. BTW this is a work in progress.
var str = "japan producer(s)";
str.replace(/(?<=^|\s)(\w)(\w+)/g, function(match, p1, p2){
return p1.toUpperCase() + p2;
});
"Japan Producer(s)"
var str = "japan producer(s)";
str.split(" ").map(val => val.charAt(0).toUpperCase() + val.slice(1)).join(" ");
"Japan Producer(s)"