A variable declared in a block or lambda expression is local to that block or lambda expression.

Here, length is local to its lambda expression; it cannot be accessed from elsewhere in something().

You can learn more about this in:
Run Edit