Сделал, как сказал 
рони 
 
alert(three(times(five()))); // must return 15
function three(x) {
	return x ? x(3) : 3;
}
function five(x) {
	return x ? x(5) : 5;
}
function times(x) {
	return function(y) {
  	return x * y;
  }
}
Еще можно составить задание под это
class MathChain {
	constructor(n) {
  	this.n = n || 0;
  }
  plus(k) {
  	this.n += k;
  	return this;
  }
  minus(k) {
  	this.n -= k;
    return this;
  }
  multiply(k) {
  	this.n *= k;
    return this;
  }
  divide(k) {
  	this.n /= k;
    return this;
  }
  valueOf() {
  	return this.n;
  }
  toString() {
  	return this.n;
  }
  toJSON() {
  	return this.n;
  }
}
let n = new MathChain(3).plus(4).multiply(2);
alert(n);