Okay so let is like a variable only the scope is the entire block.
Then hello which is the let name = is equal to a string with hello world into it
then we have another let with the name called wsRegex is equal to
See all the names for the regex letters
i ignores capitale letters
g patern patern patern
^ do not match
^ Call does only match Call
[^] searches for patterns at the beginning of strings.
. any letter
+ s s+ ss sss
S+ matches any letter as long as it containst the 1st
* go* only returns the g or o
greedy match it want the whole string
? lazy match it does the lest possible (/t[a-z]*?i/ returns ["ti"])
cat$ matches end of the string
\w [A-Za-z0-9_ alphanumeric.
\W [^A-Za-z0-9_] NONE-alphanumeric.
\d [0-9] digits
\D non-digits [^0-9]
Then we have a new variable/let that says
result is now equal to hello which contained a string then the keyword replace() which is used for u geussed it replacing something
then the wsgregex see above and a string are combined so the whitespace are now filtered out
hope it helps :3