Advent of code 2017 Day 2 (2) in Functional Programming (FP)
While your code works, it took me a few tries to really understand how it works. I believe this is primarily caused by the deep nesting of evenlyDiv. FP is great for reusable code, which makes helper functions a really good idea. In this case, by using a few helpers you can make the code more readable. 

A few pointers on your current solution: 


Don't use strings as numbers. Sure, it might work right now because division can't concatenate strings like addition can, but it is a dangerous habit to get into.
There is no need to use a regular expression in this case to split the input into rows and columns. .split(/\n/) is the same as .split('\n').
(d, v, i, line) is a lot of parameters, in this case you don't need two of them. Instead of line, you can just use row, and you never used i anyways. 
Don't default to reduce, the original function can be easily simplified by using map instead and just dropping the diff parameter. 
Try to avoid meaningless variable names. For very simple functions, it is fine to just use a, and b, but for anything longer than a line (and even some functions of only one line) it makes the code much more difficult to scan when another programmer in 6 months (you) looks at it.




Here is how I would implement the solution (assuming a relatively small table, if the table is very large, some optimization would be a good idea).



const INPUT = `5\t9\t2\t8
    9\t4\t7\t3
    3\t8\t6\t5`;

// Contained in most FP libraries, but simple to write
const unary = fn =&gt; arg =&gt; fn(arg)

const sum = (a, b) =&gt; a + b
const isNot = a =&gt; b =&gt; a !== b
const isDivisible = dividend =&gt; divisor =&gt; dividend % divisor === 0;

/**
 * Takes an array of numbers, returns the result of the division
 * of the first two numbers which divide evenly or 0 if no two 
 * numbers are divisible.
 */
const divideEvenly = numbers =&gt; {
  return numbers.reduce((carry, n) =&gt; {
    if (carry) return carry;

    const divisor = numbers
      .filter(isNot(n))
      .find(isDivisible(n));
    return divisor == null ? carry : n / divisor;
  }, 0);
}

// Without unary, parseInt would fail due to trying to parse with different bases
const solution = INPUT.split('\n')
  .map(line =&gt; line.split('\t').map(unary(parseInt)))
  .map(divideEvenly)
  .reduce(sum, 0);

console.log("solution ", solution);