'use strict';

exports.for = function (n) {
  var prime_factors = [];
  var possible_factor = 2;
  while (possible_factor * possible_factor <= n) {
    while (n % possible_factor === 0) {
      prime_factors.push(possible_factor);
      n /= possible_factor;
    }
    possible_factor += 1;
  }
  if (n > 1) { prime_factors.push(n); }
  return prime_factors;
};

'use strict';

exports.for = function (n) {
  var primeFactors = [];
  var possibleFactor = 2;
  var number = n;
  while (possibleFactor * possibleFactor <= number) {
    while (number % possibleFactor === 0) {
      primeFactors.push(possibleFactor);
      number /= possibleFactor;
    }
    possibleFactor += 1;
  }
  if (number > 1) { primeFactors.push(number); }
  return primeFactors;
};

Fix eslint errors in prime-factors
Fix eslint errors in prime-factors
