Episode 60 — Functions, Arrays, and Object Basics
In this episode, we will introduce three essential structures in programming: functions, arrays, and objects. These tools help developers write organized, reusable, and efficient code. Each one plays a specific role—functions perform tasks, arrays store collections of data, and objects group related information together. While you won’t be asked to create any of these structures on the IT Fundamentals+ exam, you are expected to recognize their purpose and identify them based on descriptions or use-case examples.
This topic appears in Domain Four of the IT Fundamentals+ certification. It falls under basic programming concepts and focuses on structural elements found in most programming languages. The exam may ask you to define what a function does, identify an array based on how data is accessed, or match an object to a group of traits and behaviors. The goal is not to master the syntax, but to build a conceptual understanding of how these elements support the flow of a program.
Let’s start with functions. A function is a reusable block of code designed to perform a specific task. Instead of writing the same code over and over again, developers create a function once and then call it by name whenever that task is needed. This improves the readability of a program and keeps code organized. Functions help reduce repetition, which also reduces the chances of making errors when changes are needed later.
A function usually includes three components: a name, one or more parameters, and a return value. The name is how you refer to the function in the program. Parameters are the input values that the function needs in order to perform its task. The return value is the output that comes back once the function has done its work. For example, a function called sum might take two numbers as parameters and return the result of adding them together.
Functions are used in a wide range of situations, from performing calculations and validating user input to formatting output and processing data. If a task needs to be repeated in multiple parts of a program, a function is the best way to avoid copying code. Functions also make code easier to test and debug. On the exam, you may be asked to identify a function by its role, such as a block of code used to calculate total price or format a phone number.
Now let’s talk about arrays. An array is a structure used to store a collection of items in a single variable. These items are usually of the same data type—such as numbers, strings, or Boolean values—and are accessed by their position in the array. Most programming languages begin counting positions at zero, so the first item is at index zero, the second at index one, and so on. Arrays are used to manage groups of similar data efficiently.
You can access or modify data in an array using its index. For example, if you have an array called names, then names square bracket zero square bracket would give you the first name in the list. Arrays are commonly used in loops, where a program goes through each item one by one and performs an action. This process of going through each item is called iteration and is useful for tasks like displaying all entries in a list or performing calculations on multiple values.
Objects are another important structure used in programming. An object is a collection that groups together related properties and functions. Properties are data values that describe aspects of the object, such as name, age, or price. Functions inside objects are called methods and are used to perform actions that relate to the object. Objects are especially useful in object-oriented programming, where they model real-world entities by combining data and behavior.
For example, you might have an object called user that contains properties like username and email, as well as methods like login or logout. This structure helps keep related information together and makes the program easier to understand. Objects help programmers model real systems—such as customers, products, or orders—using structures that mirror those real-world relationships. On the exam, you may be asked to recognize an object based on a description of grouped data and actions.
It’s helpful to compare arrays and objects to see how they differ. Arrays are best for storing ordered lists of similar items, such as numbers or names. They are accessed using numeric indexes. Objects, on the other hand, group different types of data under named keys. An array might store ten numbers, while an object might store one person’s name, age, and contact information. Both structures store data, but they do so in different ways and for different purposes.
Functions, arrays, and objects often work together in a program. A function might return an array as its result or take an array as input. An array can hold multiple objects, and an object can include arrays as one of its properties. Understanding how these structures interact helps you visualize the logic of real programs. Although the exam won’t show complex nested examples, it may describe these relationships in simple terms to test your understanding.
Learning these three structures helps you understand how programs are designed and how data flows through a system. Functions allow logic to be reused. Arrays manage lists of similar items. Objects group related information into manageable units. Once you understand what each structure is and how it behaves, it becomes easier to follow the logic of programming even without writing any code. This is the level of literacy expected by the IT Fundamentals+ exam.
Function naming and calling are foundational skills in programming. Each function must have a unique name so it can be referenced when needed. To use a function, you call it by writing its name followed by parentheses. These parentheses may contain input values, also known as arguments or parameters. Once called, the function executes its internal code and often returns a result. This process can be repeated throughout the program, making the function a powerful tool for avoiding duplication.
Arrays also include built-in features that support efficient use. One of the most useful features is the length property, which tells you how many elements are stored in the array. If an array contains five items, the length will be five. This helps determine how many times a loop should run when processing array data. Iteration refers to looping through each item in an array, performing a task for every element—such as printing, calculating, or checking a condition.
Thinking in terms of objects is a major step toward writing organized and scalable code. Object-based thinking encourages programmers to represent real-world items in a way that includes both their traits and their actions. For instance, a “car” object might have properties like color, model, and speed, and methods like start, stop, or accelerate. This mindset helps keep code clean and allows developers to manage complexity by grouping related elements together.
When it comes to exam preparation, recognizing structures by name and behavior is what matters most. A question might present a description like “a list of prices accessed by position” and expect you to identify that as an array. Another might describe “a structure with properties like name and ID, and methods like submit” and expect you to identify that as an object. Understanding how to connect function, array, or object to a plain-language description is the key to success.
There are a number of key terms that should be committed to memory. These include function, parameter, return, array, index, object, property, and method. Function refers to a named block of code. Parameters are the inputs, and return is the output. An array holds a list of items indexed by number. An object groups related data under named keys. Properties describe the object, and methods are actions the object can perform. These terms are often used directly in exam questions.
You should also be clear about what the IT Fundamentals+ exam does not expect. You will not be asked to write or declare functions, define arrays, or build objects. You will not be responsible for syntax or code structure. Instead, you are tested on basic conceptual understanding—knowing what each structure is for and how it might be described. There is no need to memorize programming rules, only functional definitions.
Let’s review how some of these questions might appear. A typical question might ask, “Which programming structure is used to store multiple related values in one variable?” The answer would be array. Another might ask, “Which structure includes both data and actions?” That would be an object. A third question could ask, “Which structure allows repeating a task without copying code?” That would be a function. Practicing these question formats will help prepare you for test day.
These concepts also relate closely to other topics you've already studied. Arrays hold values of different types, including strings, numbers, and Booleans. These values are often stored in variables, and those variables may be passed into or returned from functions. Objects may include both variables and functions as part of their structure. Recognizing how data types and program flow elements connect with structures like functions and arrays improves your overall understanding.
Learning to recognize how functions, arrays, and objects work together helps reinforce foundational IT literacy. These concepts appear in nearly all high-level programming languages—from Python and JavaScript to C Sharp and Java. Whether you're automating a task, building a website, or managing data in an application, these structures provide the framework for writing reusable, readable, and logical code. Even if you're not a developer, understanding these basics will support your ability to work in technical environments.
In business and technical settings, arrays are commonly used to hold datasets such as product prices, usernames, or system logs. Functions might be used to calculate totals, format data, or apply rules across the dataset. Objects could be used to model each user account or product with relevant details and available actions. Knowing which structure serves each purpose helps you speak clearly with developers and better understand the tools you use.
Object-oriented programming, or O O P, is based on the use of objects to represent real-world things in software. While the IT Fundamentals+ exam does not cover O O P in depth, recognizing that objects group data and functions together will prepare you for more advanced study. It’s also a good reminder that programming is not just about numbers and logic—it’s about modeling systems in ways that make sense to humans as well as machines.
To conclude this episode, remember that functions perform tasks, arrays hold lists, and objects combine data with related actions. These three programming structures appear in nearly every modern programming language and support clean, reusable, and organized code. The IT Fundamentals+ exam does not require code writing, but it does expect you to identify these concepts by their behavior and role. Understanding how they work—and how they connect to the rest of what you’ve learned—will ensure success in Domain Four.
