I finally understood what you meant by closing the file. I thought you meant in my editor haha, but close(f) worked for me. Thanks so much. That was a close call…
You can use a do-block to conveniently ensure that your file gets closed when you’re done writing to it:
notes = ["C4", "D4", "E4", "F4"]
outfile = "notes.txt"
open(outfile, "w") do f
for i in notes
println(f, i)
end
end # the file f is automatically closed after this block finishes