Update description adding template literal explanation

This commit is contained in:
iamsoorena
2017-12-22 15:03:55 +03:30
parent df4d48b80c
commit 0bce00743e

View File

@ -4,6 +4,8 @@ Convert a float-point arithmetic to the [Decimal mark](https://en.wikipedia.org/
Use `toString()` to convert the float `num` to a string, then use regex to separate every three characters of the integer part with a comma.
Use [Ttemplate Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to return joined parts.
```js
const toDecimalMark = (num) => {
let numberParts = num.toString().split('.')