Generators in Javascript; Project Euler #2
1) You have a few undeclared variables which means they become global. You want to use var (or let or const) always. Compare this:

var current = a = b = 1; // a and b are globals


To:

var current, a, b; // all variables are local
current = a = b = 1;


Same here:

sequence = fib_gen(); // not declared
even_fibs_total = 0; // not declared
cur = sequence.next().value; // not declared


Compare to:

var sequence = fib_gen();
var even_fibs_total = 0;
var cur = sequence.next().value;


2) Conventions:


Name your variables with camelCase instead snake_case.
Use === instead of == unless you know you really really need == (tip: you probably don't).
Always write if statements with braces, even if one line, for better readability and refactoring.


3) Generators are iterators, and iterators can be iterated with the for..of loop. If your environment supports generators it probably supports for..of:

function solution() {
  var evenFibsTotal = 0;

  for (var cur of fibGen()) {
    if (cur &gt;= 4000000) {
      break;
    }
    if (cur % 2 === 0) {
      evenFibsTotal += cur;
    }
  }

  return evenFibsTotal;
}


4) If you have ES6 support (or compilation via Babel) you can use destructuring assignment to simplify the fibonnaci function:

function* fibGen() {
  var a = 1;
  var b = 1;
  while (true) {
    yield b;
    [a, b] = [b, a + b];
  }
}