Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 31, 2020 21:33
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 codecademydev/e44bc4e65ca345a9550f08b0faca7306 to your computer and use it in GitHub Desktop.
Save codecademydev/e44bc4e65ca345a9550f08b0faca7306 to your computer and use it in GitHub Desktop.
Codecademy export
// Write your code here:
const convertToBaby = arr => {
for (let i = 0; i < arr.length; i++){
let newArr = [];
newArr.push('baby '+ arr[i]);
}
};
// When you're ready to test your code, uncomment the below and run:
const animals = ['panda', 'turtle', 'giraffe', 'hippo', 'sloth', 'human'];
console.log(convertToBaby(animals))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment