message: change to const
diff: * @param specs Object containing elements as properties and their weight as value
  */
  setup.weightRandom = function (specs) {
  - let sum = 0;
  - let r = Math.random();
  - let totalWeight = 0;
  + let sum = 0
  + const r = randomFloat(0, 1)
  + let totalWeight = 0
  if (specs === null || typeof specs !== 'object') {
  - return null;
  + return null
  }
  - for (var prop in specs) {
  - totalWeight += specs[prop];
  + for (const prop in specs) {
  + totalWeight += specs[prop]
  }
  - for (var prop in specs) {
  - sum += specs[prop] / totalWeight;
  - if (r <= sum) return prop;
  + for (const prop in specs) {
  + sum += specs[prop] / totalWeight
  + if (r <= sum) return prop
  }
  }
  