# \#javascript

**URL:** https://community.synatic.com/tag/javascript/23.md

[Latest](https://community.synatic.com/latest.md) · [Categories](https://community.synatic.com/categories.md) · [Tags](https://community.synatic.com/tags.md)

---

## [How to convert a number to have separators and rounding](https://community.synatic.com/t/how-to-convert-a-number-to-have-separators-and-rounding/132)

<div class="topic-metadata">

**Author:** [@navessa](https://community.synatic.com/u/navessa)\
**Replies:** 0\
**Last updated:** [November 5, 2021, 8:30am UTC](https://community.synatic.com/t/how-to-convert-a-number-to-have-separators-and-rounding/132 "2021-11-05T08:30:56Z")

</div>

This can be useful when working with numbers for measurements, currency, pricing, etc. It limits/ trims the numbers after the separator/ point to 2 decimal places. The number has to be in a number format and not a s…

---

## [Cannot read property 'map' of undefined](https://community.synatic.com/t/cannot-read-property-map-of-undefined/65)

<div class="topic-metadata">

**Author:** [@shaun](https://community.synatic.com/u/shaun)\
**Replies:** 0\
**Last updated:** [March 5, 2021, 12:06pm UTC](https://community.synatic.com/t/cannot-read-property-map-of-undefined/65 "2021-03-05T12:06:12Z")

</div>

If you see the error “Cannot read property ‘map’ of undefined”, it implies you are trying to map to a empty array or set of values. Typically, the javascript code within the calculator will appear as below: inputRecord…
