Last active
July 18, 2018 09:26
-
-
Save katakeynii/2a7bb0789af66488559299da8d16fb27 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 throwMissing = (parent) => { throw new Error(`le nom de ${parent} doit etre renseigné`) } | |
const CodeFamille = (papa = throwMissing("papa"), mere = throwMissing("Maman"), ...children ) => { | |
if(children.length == 0){ | |
console.log(" Pas d'enfants ") | |
return; | |
} | |
console.log("Papa: ", papa, "Maman: ", mere, "enfants :", children ) | |
} | |
CodeFamille("Moussa") | |
Susu j'avais vu cela j'ai modifié thanks great (y)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pourquoi pas