File read lines
๐ RubyQuickly read every line from a file into an array using File.readlines in Ruby.
Ruby
lines = File.readlines('data.txt')
puts lines.inspect
Comments
No comments yet. Start the discussion.