I had a productive day tackling JavaScript exercises. While it was enjoyable, a few exercises were perplexing. Today marks Kel’s mom’s return from the hospital after a few weeks of being there. I’m relieved that she’s doing better now.
As for my day, I have a little to report. I really need to dive into my hobbies. I’ve been eyeing my crochet kit and am eager to use it. Additionally, I want to reignite my passion for scrapbooking. I have the perfect notebook and all the ephemera; all that’s left is to print some pictures and start creating. I suggested to Tommy that we get a mini printer, but he insisted we use our big one. I’ll make do with that, cutting out the pictures and gluing them into my notebook. Those mini printers are so cute! Ok, I shouldn’t buy things just because they are adorable. Looking at my desk, I realize I need an envelope or something to store all the Isotopes receipts. The Isotopes, our local baseball team, accept receipts as payment for tickets. I hope that makes sense. Instead of having them scattered on my desk, I need a place to keep them.
O’Malley found a cozy spot under my desk today. I had to be extra cautious not to accidentally step on him and made sure to check on him regularly. He seems to enjoy resting on the footrest under my desk, which also helps me since I can’t reach the floor when sitting. I should tidy up my desk soon. Alex gave me some papers to put in my safe, and I plan to take care of them today instead of leaving them on my desk. I prefer to keep my workspace uncluttered. I want to get a small file container, like the other ones we have, to put the girls’ IEP school files in and some other papers. It would help clear my desk.
I’m feeling a bit scattered. I need to transfer a few files from my computer so that Tommy can reformat the drive. It’s only a small number of files. I seem to have lost most of the files on the drive. My other hard drive (E:) is currently on Tommy’s desk for data recovery. I’m back at my desk while waiting for the data recovery process to complete. I have pictures and documents on that drive that I would like to save. It’s surprising and unfortunate that both of my drives have failed. I’m wondering if I had a virus without realizing it.
In the reading world, I’m still reading The Iron Flame. I have been neglecting reading for the past week. I’m also reading Word Slut, which is a journey through the English language and the many ways it upholds and reinforces the patriarchy. It’s not a bad read but an extremely feminism 101-level read with a little intro to socio-linguistic. This weekend, I will try to get back into my reading.
JavaScript notes…
—————————————-
The Odin Project. JavaScript Exercises.
// Hello World
const helloWorld = function() { return "Hello World" };
//Repeat String
const repeatString = function(string, num) { let result = ''; for (let i = 0; i < num; i++) { result += string; } return result; }; console.log(repeatString(hey, 3));
//Reverse String
const reverseString = function(string) { return string.split("").reverse().join(""); }; console.log(reverseString('hello there'));
//Remove From Array
const removeFromArray = function(array, ...args) { return array.filter(item => !args.includes(item)); }; console.log(removeFromArray([1, 2, 3, 4], 3));
//Sum All
const sumAll = function(start, end) { let sum = 0; let min = Math.min(start, end); let max = Math.max(start, end); for (let i = min; i <= max; i++) { sum += i; } return sum; };
//Leap Years
const leapYears = function(year) { const isYearDivisibleByFour = year % 4 === 0; const isCentury = year % 100 === 0; const isYearDivisibleByFourHundred = year % 400 === 0; if ( isYearDivisibleByFour && (!isCentury || isYearDivisibleByFourHundred) ) { return true; } else { return false; } };
//Temperature Conversion
const convertToCelsius = function() { const celsius = (fahrenheit - 32) * 5 / 9; return Math.round(celsius * 10) / 10; }; const convertToFahrenheit = function() { const fahrenheit = (celsius * 9 / 5) + 32; return Math.round(fahrenheit * 10) / 10; }; console.log(convertToCelsius(32)); // Output: 0