Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 84 - 2632_CodeMind
P. 84

    Now, click on the A button in the Game Controls to view the further output till it reaches the last iteration
                     of the for loop.

                              Tech Funda

                          You can also see JavaScript /Python code equivalent to given block code in MakeCode Arcade.

                          While Loop

                     The while loop runs if a specified condition is true. This type of loop is useful when the number of iterations
                     depends on a dynamic condition rather than a fixed count. Using while loops allows for actions and tasks
                     that repeat until certain conditions are met.
                     Let us create a project in MakeCode Arcade that demonstrates the use of while block to display the table
                     of 2. Prepare the project in MakeCode Arcade as shown below:

                     The join block is used to concatenate (combine) two or more pieces of text (strings) together into a single
                     string. This block is particularly useful when you need to create a message or label that combines static
                     text with dynamic values, such as scores or player names.

                                                                                           Advanced MakeCode Arcade    83

| 79 80 81 82 83 84 85 86 87 88 89 |