Skip to content

Commit

Permalink
Задача 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
osvetilka committed Jan 29, 2025
1 parent 3b502d9 commit 90f4291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 02-javascript-data-types/2-pick/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
*/
export const pick = (obj, ...fields) => {
const filt = Object.entries(obj).filter(item => fields.includes(item[0]))
return Object.fromEntries(filt);;
return Object.fromEntries(filt);
};
3 changes: 2 additions & 1 deletion 02-javascript-data-types/3-omit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
* @returns {object} - returns the new object
*/
export const omit = (obj, ...fields) => {

const filt = Object.entries(obj).filter(item => !fields.includes(item[0]))
return Object.fromEntries(filt);
};

0 comments on commit 90f4291

Please sign in to comment.