1_looping_code
dz / mdn / js / 1_javascript_building_blocks / 1_looping_codeSummary
looping code
Node Tree
Nodes
loops | |
content | loops |
children | skipping_continue, standard_for_loop, while_do_while, exiting_loops_break, looping_through_collection |
looping_through_collection | |
content | Looping Through a Collection |
children | map, collections_examples, filter, for_of_loop |
parents | loops |
for_of_loop | |
content | for .. of loop |
children | standard_for_loop (for loop is older than for/of) |
parents | looping_through_collection |
collections_examples | |
content | collections: array, set map |
parents | looping_through_collection |
map | |
content | map(): do something to each item in collection and create a new collection containing the changed items |
children | filter (similar) |
parents | looping_through_collection |
filter | |
content | filter(): test each item in collection, create new collection containing only items that match |
children | function_expressions |
parents | map, looping_through_collection |
function_expressions | |
content | used with function expressions |
parents | filter |
standard_for_loop | |
content | Standard for loop |
parents | for_of_loop, loops |
exiting_loops_break | |
content | exiting loops with break |
parents | loops |
skipping_continue | |
content | Skipping iterations with continue |
parents | loops |
while_do_while | |
content | while and do ... while |
children | do_while_run_at_least_once |
parents | loops |
do_while_run_at_least_once | |
content | Code inside a do/while loop is always expected to run at least once |
parents | while_do_while |