There is More There Than Meets the Array
Luckily, there are a few tried and tested alternatives to arrays when it comes to using effective measures to structure data. In fact, some alternative data structures offer programmers creative solutions where arrays may be lacking. For example, believe it or not, in some languages the size of an array has to be decided at the time of declaration. This offers challenges if the programmer plans on having an array that is designed to grow in size. Now you’re probably thinking, “just redeclare another bigger array and move everything into that one”. Going that route, we start to run into inefficient practice with regards to time. We want our programs to be fast. A good solution around this is a linked list. There are three basic types of linked list: singly, doubly, and circular. They all take advantage of using a pointer variable that will reference the next node in the link. A doubly linked list uses two, the additional one often being declared a ‘head’ variable. A circular linked list allows all nodes in the list to be connected; there is no ending node.
Outside of these solutions to size defined arrays, there are more efficient solutions to small problems than what arrays provide. Stacks and queues are clever solutions to practical problems. Stacks abide by LIFO (Last In, First Out) and queues by FIFO (First In, First Out). They are oppositely ordered operations. Both of these data structures use similarly functioning methods: pop, push, peek. With only these methods, we can structure and manipulate data in a more efficient manner.
I would like to briefly raise one’s awareness about CSS frameworks. We have only been exposed in those most minimal of instances throughout the program, but I feel taking the initiative to learn at least the basics of some of them can go a long way. Bootstrap is an extremely popular and easy to use framework. Their documentation is fantastic and easy to digest. There is also Tailwind CSS and Semantic UI. Starting with these will lay a good ground on which to develop further skills. Keep in mind, the way one introduces these frameworks into one’s program ought to vary. The basic options are twofold. You can either download the entity of the library as a dependency or similar reference the library in the parent html file. The latter, from my understanding, doesn’t overload your program with the full library, but it does allow you to select from the parts of the framework you need. This hopefully saves your program precious seconds from the user’s prospective.