Giter Club home page Giter Club logo

Comments (1)

dhess avatar dhess commented on May 25, 2024

While playing with https://studio.code.org, I discovered that they have a clever way of commenting out code by wrapping code in an "unused code" block:

Screen Shot 2021-02-19 at 2 06 08 PM

You can move an "Unused code" block into another block and it will automatically be uncommented. Here I dragged the previously unused code block "make a new sprite called mySprite with costume foo" into the main program, at which point it automatically became active code again:

Screen Shot 2021-02-19 at 2 09 21 PM

When new code blocks are initially dragged into the canvas but are not initially attached to other blocks, or when code blocks are dragged out of another block and placed on their own, they are not initially wrapped in "Unused code" blocks. But once you run the program, any unattached blocks are wrapped in an "Unused code" block.

There's also a "comment" block that you can attach to other blocks to add a comment that doesn't affect the program's behavior.

from primer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.