I have following input range (slider), values allowed are from 0 to 100.
I need to map values from the slider to a input text, with the following rules:

```
      range => text
          0 => 2000
        100 =>  200

```

With the value in between accordingly.
Currently I am using the following script, which works, but I would like to know if there is a better way to do it.

```js
var slider = document.querySelector('#slider');
var result = document.querySelector('#result');
slider.addEventListener('change', function(event) {
  var sliderValue = event.target.value;
  var maxValue = 2000;
  var coef = 18;
  var calc;
  calc = maxValue - (sliderValue * coef);
  result.value = calc;
});
```

```html
<input id="slider" type="range" name="points" min="0" max="100" value=0>
<input id="result" type="text" name="result">
```