0

enter image description here

Before returning the function, it will perform 3 actions: 1- set the lower case of the letters of the received text, 2- find what needs to be replaced (non-whitespace characters that are at the beginning or after a space), 3- set the upper case of the first letters of words.

The syntax for an arrow function with an argument looks like this: let func = (arg1, arg2, ... argN) => expression, without an argument: let func = () => expression. But in the third action of the titleCase function there is an arrow but there are no parameters and brackets. Explain in detail how it works

Dmitry
  • 35
  • 7
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace – ksav Nov 14 '20 at 11:44
  • Also helpful: [Arrow function expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) – raina77ow Nov 14 '20 at 11:45

0 Answers0