Chapter 5: Arrays and Maps
Now that we have understood basic concepts in V, including variables, constants, and primitive types, in this chapter, we will focus on arrays and maps. We will learn about the different ways in which to declare arrays and how to initialize them during their declaration using the various properties available to define an array. Additionally, we will explore how to use the in
and <<
operators in arrays. Then, we will walk through the process of working with fixed-size arrays and multidimensional arrays. We will also gain a better understanding of arrays by implementing the most frequently performed operations on them, including cloning, sorting, and filtering techniques.
In this chapter, we will also learn about maps that hold data in the form of key-value pairs. Maps in V are often referred to as dictionaries just like other programming languages, such as C# and Python. We will examine how to work with maps and understand various ways in which we...