Hi, Emil!
If you're only concerned about the display format for the end users of your application, all you need to use is: number.toLocaleString('da-DK'). I'm using the Danish (Denmark) locale string ('da-DK'); it will output the number in the format as you require — , for decimals, and . for thousands.
For instance, (33500.5).toLocaleString('da-DK') will return "33.500,5".
Hope this helps! :)