Last active
March 26, 2018 12:23
-
-
Save MartinsAlexandre/0fcdf80400ce6a867c193dae411d982a to your computer and use it in GitHub Desktop.
es6-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const address = { | |
city: "Lyon", | |
state: "FR", | |
zip: 69001 | |
}; | |
const sportList = ['Football', 'BasketBall'] | |
const ortherSportList = ['Boxe', 'Judo'] | |
function display(address, ...sports) { | |
let mySports = []; | |
mySports.push(...sports); | |
let city = address.city === undefined ? "Paris" : address.city; | |
console.log("je viens de " + city + " mes sports favoris sont : " + mySports); | |
} | |
display(address, sportList, ortherSportList); | |
display(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment