THE BEST NEWSLETTER ANYWHERE
Join 6,000 subscribers and get a daily digest of full stack tutorials delivered to your inbox directly.No spam ever. Unsubscribe any time.
This tutorial explains about following things
Array and sequence are data structures used to store(container) collection of elements. Size of these containers contains number of elements in it.
Please following below steps to find the length of an array.
Array
contains len
procedure to return an size of an array. here size always fixed at compile time.var array = ["one,"two","three"]
echo array.len # 3
Please following below steps to find the length of an sequence.
sequence
contains len
procedure to return an size of an sequence. size is dynamic.var
seq = @[1, 2, 3]
echo seq.len # 3
🧮 Tags
Recent posts
Julia examples - Variable Type Nim example - Convert String to/from the Int How to get length of an array and sequence in Nim? Nim environment variables - read, set, delete, exists, and iterate examples? How to convert from single character to/from string in Nim?Related posts