 Remember to use <a>**`Read-Search-Ask`**</a> if you get stuck. Try to pair program  and write your own code 
###  Problem Explanation:
Convert the given string to a lowercase sentence with words joined by dashes.
#### Relevant Links
*<ahref='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String'target='_blank'rel='nofollow'>String global object</a>
The tricky part is getting the regular expression part to work, once you do that then just turn the uppercase to lowercase and replace spaces with underscores using `replace()`.
// Create a variable for the white space and underscores.
var regex = /\s+|_+/g;
// Replace low-upper case to low-space-uppercase
str = str.replace(/([a-z])([A-Z])/g, '$1 $2');
// Replace space and underscore with -
return str.replace(regex, '-').toLowerCase();
}
// test here
spinalCase('This Is Spinal Tap');
### Code Explanation:
***regex** contains the regular expression `/\s+|_+/g`, which will select all white spaces and underscores.
* The first `replace()` puts a space before any encountered uppercase characters in the string **str** so that the spaces can be replaced by dashes later on.
* While returning the string, another `replace()` replaces spaces and underscores with dashes using **regex**.
* Similar to the first solution, the first `replace()` puts a space before any encountered uppercase characters in the string **str** so that the spaces can be replaced by dashes later on.
* Instead of using `replace()` here to replace whitespace and underscores with dashes, the string is `split()` on the regular expression `/(?:_| )+/` and `join()`-ed on `-`.
##  NOTES FOR CONTRIBUTIONS:
*  **DO NOT** add solutions that are similar to any existing solutions. If you think it is **_similar but better_**, then try to merge (or replace) the existing similar solution.
* Add an explanation of your solution.
* Categorize the solution in one of the following categories — **Basic**, **Intermediate** and **Advanced**. 