Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to convert string to random case in javascript

const randomCase = () => {
  function toggleCase(str) {
    return str
      .toUpperCase()
      .split(" ")
      .map(function(word) {
        return word.charAt(0).toLowerCase() + word.slice(1);
      })
      .join(" ");
  }
  const newText = toggleCase(text);
  
  return newText;
};
Source by www.textbotonline.com #
 
PREVIOUS NEXT
Tagged: #convert #string #random #case #javascript
ADD COMMENT
Topic
Name
7+3 =