I read about “ProperCase” but couldn’t make it work.
The other option that I thought was extracting the first letter and make it UPPER CASE and merge the 2 variables.
I researched and found this but couldn’t make it work due to my limited knowledge on this area
{
"Name": "AAA",
"CreationDate": "2021-6-14",
"Commands": [
{
"Command": "store",
"Target": "I want to capitalize the first letter of each word of a text stored in a variable How should it be done? Any help will be much appreciated.",
"Value": "AAA",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "const str = ${AAA};\nconst arr = str.split(\" \"); \nfor(var i=0; i<arr.length; i++)\n {\n arr[i]= arr[i].charAt(0).toUpperCase() + arr[i].slice(1);\n\n }\nconst str2 = arr.join(\" \");\nreturn str2;",
"Value": "CCCC",
"Description": ""
}
]
}