Wednesday, June 8, 2022

Js programming why function

This is the better reason for a function, when I satarted we sometimes write the commands the same in diferent places of the code to repeat what was doing, 

    Is that we have the initial stage and once run the code we came from a train-station to other train-station, isn't a loop that we want but in one moment return for the initial stage and a function do that for us, we write a function and put in the initial stage and put the same function in the end of the code after we achieve the end stage, of course, that inside the function have a yes-no test to if in the final stage we have a return for the beginning, isn't always what we want maybe we wanted that once run the code an choice is made and remains that way. Rute Bezerra de Menezes Gondim

No comments:

Post a Comment