I have spent my morning figuring out how to write a function that returns an array containing the first ‘n’ Fibonacci numbers. I found out what I need to do:
Initialize an empty array.
If n is 1, return [0] (since the first Fibonacci number is 0).
If n is 2, return [0, 1].
Otherwise, use a loop to generate the sequence by adding the last two numbers.
However, I’m a bit confused about how to code this. The skeleton code would look like this:
function fibonacci(n) { // Your code here }
I prepared a sandwich for lunch and am finally getting around to eating it a bit later than usual. It took me some time to decide what to prepare. I’m relieved that my therapy session has been rescheduled for tomorrow, as I’m not really in the mood for it today. Coding has been quite frustrating for me, and I find myself reluctant to take a break; I really want to understand this code and work through it. My focus is decent today, and I’m not experiencing any distractions.
However, since I’m writing in my journal, I suppose I am a bit distracted at the moment. The weather is cooler today, and it looks like it might rain. I hope it will rain. I like the rain. I need to remind myself to visit the library—I’ve been forgetting, and if I continue to do so, I’ll miss the chance to go this weekend.
Spring break is just a few weeks away. Lexi will be in the city for a theater presentation the week before spring break, making it easy to pick her up. I’m uncertain whether she will return to school with her friend after the break or if we will be driving her back.
It’s now much later in the day, and I still haven’t fully figured out the Fibonacci function code yet, but I’m making progress. I managed to clear the mail off my desk and shredded anything that needed it. The only items left are Lexi’s mail, which I should probably place on her desk for her to find when she gets home; this way, I can keep my desk tidy. 🙂





