Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 9, 2022 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/d413047e4645c7984653a30e64480a4d to your computer and use it in GitHub Desktop.
Save parzibyte/d413047e4645c7984653a30e64480a4d to your computer and use it in GitHub Desktop.
const combinarObjetos = (objeto1, objeto2) => {
const resultado = {};
for (const clave of Object.keys(objeto1)) {
resultado[clave] = objeto1[clave];
}
for (const clave of Object.keys(objeto2)) {
resultado[clave] = objeto2[clave];
}
return resultado;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment