Skip to content

Design a visualisation to break down how for loops and while loops work #603

@NathanLovato

Description

@NathanLovato

In a line like :

for element in array:

People often struggle to understand what element is, where it comes from, and why it gives us access to the array's value. We should create an animation or something so that people can really see how the variable points to each value in the array in each iteration.

We could also stress that element could have any name: it's a variable that we create, and like every variable we create, we can name it freely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentIssues with the lessons, practices, including their code examples

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions