Skip to content

Instantly share code, notes, and snippets.

@brunosabot
Created March 30, 2022 17:52
const walkingAnimals = ["cats", "dogs"];
const flyingAnimals = ["eagle", "falcon"];
const animals1 = [...walkingAnimals, ...flyingAnimals];
const animals2 = ["dolphin", ...flyingAnimals, ...walkingAnimals];
console.log(animals1); // ["cats", "dogs", "eagle", "falcon"]
console.log(animals2); // ["dolphin", "eagle", "falcon", "cats", "dogs"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment