lib/sugar.js
/*
  This function will receive an object and a key, and will return true if the object has the given key, and false if not.
*/
This function will receive an object and a key, and will return true if the object has the given key, and false if not.
This function will receive an object and a key and will return true if the object has the given key and false if not .
function has(object, key) {
  let match = false;
  const getKeyValue = Object.keys(object);
  for(let keys of getKeyValue) {
    if(keys === key) {
      match = true;
    }   
  }
  return match;
}
function has ( object , key ) { let match = false ; const getKeyValue = Object . keys ( object ) ; for ( let keys of getKeyValue ) { if ( keys === key ) { match = true ; } } return match ; }
This function will receive an object and a key, and will return true if the object has the given key, and false if not.
This function will receive an object and a key and will return true if the object has the given key and false if not .