how to get first character of string in react js?
Hi Friends 馃憢, Welcome To Infinitbility! 鉂わ笍 To get first character of string in react js, use substring() method to extracts first character from string. You have to only pass starting and ending postion of string so for first character pass 0, 1 as parameter it will return first character of string. Let鈥檚 see short example to use substring() to get first character from string. text.substring(0, 1); Today, I鈥檓 going to show you How do I get first character of string in react js, as above mentioned, I鈥檓 going to use the above-mentioned substring() method....