src/clone.js
/**
 * Returns a shallow-copied clone of a given object.
 * @param {Object} obj - A given object to clone.
 * @returns {Object}
 * @example
 * clone(object);
 */
Returns a shallow-copied clone of a given object.
@param {Object} obj - A given object to clone.
Returns a shallow - copied clone of a given object . @param { Object } obj - A given object to clone .
function clone(obj) {
  let copy = {};
  for (let prop in obj) {
    if (obj[prop]) {
      copy[prop] = obj[prop];
    }
  }
  return copy;
}
function clone ( obj ) { let copy = { } ; for ( let prop in obj ) { if ( obj [ prop ] ) { copy [ prop ] = obj [ prop ] ; } } return copy ; }
Returns a shallow-copied clone of a given object.
Returns a shallow - copied clone of a given object .