Flow control: Learning the Fundamental that Alter Data Flow
Flow control allows a developer to erect a structure in a programming language that will determine the order in which statements are executed. Flow control is achieved through structures, such as, conditionals (if-else statements and switch-case statements) and loops (while loops, for loops, and do-while loops). They allow a developer to control the flow of execution within their programs, making decisions based on conditions and repeating actions as necessary to achieve a desired result. The break statement allows the abrupt termination of a loop or switch statement, while the continue statement skips the rest of the loop body and proceeds to the next iteration. Pieces in a program fit together like legos and learning fundamentals helps a developer form a good place to start when approaching any program structure.
Comments
Post a Comment