Functions in a loop over string array usually returns nothing

pwd() returns a string, rather than actually printing the working directory. Since for loops return nothing, you don’t get to see that string unless you explicitly print it. Try this:

for directory in list_dirs()
    cd(println ∘ pwd, directory)
end
2 Likes