Зачем нужны функции? [ SOLVED ] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Зачем нужны функции? [ SOLVED ]

Не понимаю зачем нужны функции, хотя знаю что они нужны. Обьясните, пожалуйста, зачем они нужны? Просто когда я пишу какой-либо код, я их не использую...

29th Dec 2020, 11:43 AM
😎_M_😎
😎_M_😎 - avatar
5 Answers
+ 3
Fastest example and without changes in your core code, here for getting a structure in the code, what help for beter servicing, reading and searching of problems of a code as well as using parts of it in future projects. https://code.sololearn.com/cTf9hm7nrB03/?ref=app
29th Dec 2020, 12:47 PM
JaScript
JaScript - avatar
+ 4
Если увидишь что в коде что то повторяется несколько раза из этого возможна делать функцию. Или хочется в очень большем коде разделить частьей которые делают разные задачей.
29th Dec 2020, 11:57 AM
JaScript
JaScript - avatar
+ 2
Jan Markus, JaScript, Thank you very much for bothering to translate my question into my own language, now I understand exactly where to use the functions, but where can I use them with the example of the attached code? https://code.sololearn.com/c3kGaqHjDLS3/?ref=app
29th Dec 2020, 12:04 PM
😎_M_😎
😎_M_😎 - avatar
+ 1
JaScript, Thank you so much for your help!
29th Dec 2020, 12:51 PM
😎_M_😎
😎_M_😎 - avatar
+ 1
😎_M_😎 Continue to have fun with coding.
29th Dec 2020, 1:01 PM
JaScript
JaScript - avatar