Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 86 - 2632_CodeMind
P. 86

    Let us create a project in MakeCode Arcade that demonstrates the use of break block. Prepare the project
                     in MakeCode Arcade to display the numbers till 6 but as soon as it reaches 4 it exits from the loop as shown
                     below:

                     When you run the project, the following output displays the first iteration of the repeat loop.

                     Now, click on the A button in the Game Controls to view the output of further iteration of the while loop.
                     Notice that, when the index value is 4, the loop breaks and stops executing further.

                                                                                           Advanced MakeCode Arcade    85

| 81 82 83 84 85 86 87 88 89 90 91 |