Stay organized with collections
Save and categorize content based on your preferences.
blockly > Block > getNextBlock
Block.getNextBlock() method
Return the next statement block directly connected to this block.
Signature:
getNextBlock(): Block | null;
Returns:
Block | null
The next statement block or null.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003egetNextBlock()\u003c/code\u003e method retrieves the next statement block directly connected to the current block.\u003c/p\u003e\n"],["\u003cp\u003eIt returns either a \u003ccode\u003eBlock\u003c/code\u003e object representing the next statement or \u003ccode\u003enull\u003c/code\u003e if there isn't one.\u003c/p\u003e\n"]]],["The `getNextBlock()` method, part of the `Block` class, retrieves the next statement block that is directly connected to the current block. It returns either a `Block` object, representing the next block in the sequence, or `null` if there is no subsequent block. This method helps in navigating the chain of blocks in a sequence.\n"],null,["[blockly](./blockly.md) \\\u003e [Block](./blockly.block_class.md) \\\u003e [getNextBlock](./blockly.block_class.getnextblock_1_method.md)\n\nBlock.getNextBlock() method\n---------------------------\n\nReturn the next statement block directly connected to this block.\n\n**Signature:** \n\n getNextBlock(): Block | null;\n\n**Returns:**\n\n[Block](./blockly.block_class.md) \\| null\n\nThe next statement block or null."]]