diff --git a/src/extensions/jwArray/index.js b/src/extensions/jwArray/index.js index ee0646f07a0..4e591394933 100644 --- a/src/extensions/jwArray/index.js +++ b/src/extensions/jwArray/index.js @@ -192,6 +192,7 @@ class Extension { opcode: 'get', text: 'get [INDEX] in [ARRAY]', blockType: BlockType.REPORTER, + allowDropAnywhere: true, arguments: { ARRAY: jwArray.Argument, INDEX: { @@ -250,6 +251,41 @@ class Extension { } }, ...jwArray.Block + }, + "---", + { + opcode: 'forEachI', + text: 'index' + blockType: BlockType.REPORTER, + hideFromPalette: true, + allowDropAnywhere: true + }, + { + opcode: 'forEachV', + text: 'value' + blockType: BlockType.REPORTER, + hideFromPalette: true, + allowDropAnywhere: true + }, + { + opcode: 'forEach', + text: 'for [I] [V] of [ARRAY]', + blockType: BlockType.COMMAND, + hideFromPalette: true, + arguments: { + ARRAY: jwArray.Argument, + I: {}, + V: {} + } + }, + { + blockType: BlockType.XML, + xml: ` + + + + + ` } ], menus: {