code: function nest(array, insert) {
    let obj;
  
    array.reverse().forEach(key => {
      obj = { [key]: insert };
      insert = obj;
    });
  
    return insert;
  }
docs: Nest the insert value into objects with keys from array