Skip to content

Instantly share code, notes, and snippets.

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 maylisdoucet/1ec62849756072322bacb068a305537c to your computer and use it in GitHub Desktop.
Save maylisdoucet/1ec62849756072322bacb068a305537c to your computer and use it in GitHub Desktop.
allsports.js
const address = {
city: "Lyon",
state: "FR",
zip: 69001
};
const sportList = ['Football', 'BasketBall']
const otherSportList = ['Boxe', 'Judo']
const allsports = [...sportList, ...otherSportList]
const display = (city, ...allsports) => {
return "C'est à " + city + "que l'on pratique le plus : " + [...allsports]
}
console.log(display(address.city, ...allsports));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment