Complexe scolaire UJN

Functions are used to separate out sections of code that perform a particular task. For
example, maybe you often need to look up a date and return it in a certain format. That
would be a good example to turn into a function. The code doing it might be only three
lines long, but if you have to paste it into your program a dozen times, you’re making
your program unnecessarily large and complex, unless you use a function. And if you
decide to change the data format later, putting it in a function means having to change
it in only one place.

Poster un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *