<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Clare Eisentrout on Medium]]></title>
        <description><![CDATA[Stories by Clare Eisentrout on Medium]]></description>
        <link>https://medium.com/@cheisentrout?source=rss-639f20292e96------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kUu71xTwsEQ7u_opr5YuTQ.jpeg</url>
            <title>Stories by Clare Eisentrout on Medium</title>
            <link>https://medium.com/@cheisentrout?source=rss-639f20292e96------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 09:58:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cheisentrout/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JavaScript30 — Day 20]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-20-4407530770e0?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/4407530770e0</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Wed, 17 Mar 2021 18:19:02 GMT</pubDate>
            <atom:updated>2021-03-17T18:19:02.694Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 20</h3><p><em>Programming a navigation menu highlight/hover feature!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*f6vxRSAbX98ZvPC7rO0UFg.png" /></figure><p>Today’s project was the foundation for a larger navigation project I’ll tackle later in the week. It reminds me of how a spotlight works on stage — it pins on to a feature and calls focus to it, but can move around and never disappears while in motion. The movement of the spotlight is part of the drama — where will it settle?</p><p><strong>Bits</strong></p><ul><li>Today’s project relied heavily on the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect">.getBoundingClientRect()</a> method. We used it within a function and applied it to “this”, which initially confused me, until I logged “this” to the console. Since we attach the highlightLink function to the “triggers” variable through an event listener, “this” refers to whichever element within “triggers” the mouse is hovering over. So, if we hovered over the “home” link in the navigation menu, .getBoundingClientRect() would retrieve all of the rectangle properties of that element — pictured below is the result of the following code: <em>const linkCoords = this.getBoundingClientRect(); </em><strong><em>/</em></strong><em> console.log(linkCoords);</em> .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*shNDnYjciuUXDLXVWZBkBA.png" /></figure><ul><li>I felt a little shaky on the CSS transform property, specifically the translate values, although I’ve addressed them before! I returned to CodePen to create a <a href="https://codepen.io/cheisentrout/pen/VwmOQJO">short exercise</a> using CSS transform to move a &lt;div&gt; element diagonally across a page. The next step would be… figuring out how to move it back!</li></ul><p><strong>Blindspots</strong></p><ul><li>The overall concept in JS that is still confounding me is knowing which information to store in a variable, or an array, or an object/class, and why. I feel like so far I’ve familiarized myself with a lot of pieces of JS, but I haven’t yet learned how to put the puzzle together in an efficient and effective way. It’s hard not to be impatient — I wish I were there, and able to think fluently in JS already!</li><li>Initially, I thought we’d be able to create this mobile highlighting effect by creating a function that applied a CSS class (of a white background with rounded edges) to each link, and adding an event listener for mouseover, which would trigger the addition of the background class. However, I was continuously thrown an error message that told me “addEventListener is not a function”. I did a bunch of research and thought I’d found the answer — querySelectorAll returns a Node list, and you can’t apply an event listener to multiple elements in a Node list at once. Next, I tried transforming the Node list into an array, and using the forEach() array method inside functions to address array items individually. That didn’t work either! You can imagine my confusion when I noticed that in the solution code, it wasn’t even necessary to transform the Node list into an array, and that you can use forEach() on a Node list. I think where I went awry was trying to use the variable containing the Node list inside of a function? That’s the only logical difference I can spot between my various code-attempts and the solution code.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*UgBbGoo3QeJ-N8zn_bzGGQ.png" /><figcaption>My unsuccessful attempt!</figcaption></figure><p>I really dove in on a lot of topics from today’s project, and did a ton of documentation reading — it has left me with no time for a breakdown! I will make a point to get back to it tomorrow. In the meantime, my commented code is <a href="https://github.com/cheisentrout/JavaScript30/blob/master/22%20-%20Follow%20Along%20Link%20Highlighter/index-START.html">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4407530770e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 19]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-19-e49559cfe9ae?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/e49559cfe9ae</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Mon, 15 Mar 2021 19:25:10 GMT</pubDate>
            <atom:updated>2021-03-15T19:25:10.134Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 19</h3><p><em>Programming a sticky navigation menu!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sOLzFeNpvE2Z57FigC-8BQ.png" /><figcaption>Sticky nav design by Wes Bos, for JavaScript30.</figcaption></figure><p>When I shut down shop on Friday, I expected to return today to work on some “Webcam Fun”. When I checked out the intro to that video, however, I decided that this exercise would be a better use of my time. The webcam exercise is definitely one that I’m curious to return to in the future, but a sticky navigation menu is something I hope will be bread and butter for me when I’m working as a front end developer!</p><p>Also, with my Software Engineering Immersive program at General Assembly starting next week, I won’t have time to finish the *full* JS30 before then, so I want to focus on projects that feel especially prudent. I may spend more time this week focusing on fundamentals of vanilla JS, making sure I’m as prepared as can be for my start date next Monday, and returning to JS30 in June when I’m on a full-time job search. I am already excited!</p><p><strong>Bits</strong></p><ul><li>For any user interaction that involves scrolling (such as fixing a navigation bar to the top of the screen), you can use the values returned from the “<a href="https://www.w3schools.com/jsref/prop_element_offsettop.asp#:~:text=The%20offsetTop%20property%20returns%20the,border%20of%20the%20offsetParent%20element">offset</a>” family properties (offsetTop, offsetHeight, offsetWidth, etc.), and the window.scrollY/X values. In today’s project, we stored the location of the top of the navigation menu in a variable called “topOfNav”. Then, we used the window.scrollY value (the distance that had been vertically scrolled) to compare it to the topOfNav. If more distance had been scrolled than the distance to the top of the navigation menu, we added the class of “fixed-nav” to the menu. And there it stayed!</li><li>When triggering a JS event that involves adding a CSS class to an HTML element, it can be a good approach to write that CSS class on a higher-up parent element. That way, if you want to be able to apply that class to multiple elements at different times, it’s easily accessible. For instance, we appended the “fixed-nav” class to the &lt;body&gt; tag, rather than the &lt;nav&gt; itself. To be honest, though, I’m not sure why the “fixed-nav” class then only applies to the nav tag once the condition is met — is it because we target only the nav tag in CSS?</li></ul><p><strong>Blindspots</strong></p><ul><li>Using “*” in CSS for before and after classes. I’ve seen this in several documents now and am not sure what it means or what it affects.</li><li>I could stand to explore rgba values! I’ve previously only dealth in hex codes.</li></ul><p><strong>Breakdown</strong></p><ul><li>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">ES6 destructuring</a> technique is used to break down values in arrays or objects, in order to more easily access them. I think. You can declare multiple variables in one line without values on the right hand side of the assignment operator (=), and then stick them in an array or an object… adding defined values on the right hand side thereafter. Heres an example:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*uEvV2XFAAzJ4zcoW4uBC9g.png" /></figure><p>In the example above, we declare a, b, and “leftout” as variables. We then assign values to a and b by placing them in an array, and on the opposite side of the equals sign, adding values in the order we want them to correspond with the variables. When we later add “leftout” to the variable array, we can precede it with “…” (or “spread”, in ES6) to assign the remaining values in the right hand side array to it.</p><p>Although there is much more to grasp with destructuring, I at least can recognize the syntax and understand how to use it moving forward!</p><p>My commented code from today’s sticky nav project can be found at my <a href="https://github.com/cheisentrout/JavaScript30/blob/master/24%20-%20Sticky%20Nav/index-START.html">GitHub profile</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e49559cfe9ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 18]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-18-3b13de49d953?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b13de49d953</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Fri, 12 Mar 2021 17:25:40 GMT</pubDate>
            <atom:updated>2021-03-12T17:25:40.286Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 18</h3><p>Adding up times with .reduce()!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dpSsQjs9R6jHIU3f36NeCQ.png" /></figure><p>Today’s project covered a method of tallying total run time for a playlist given that the time values were represented as “minutes: seconds”. This was another project that helped me get closer to “thinking like a computer”, and realize how many steps are necessary to convert and interpret information in JavaScript.</p><p><strong>Bits</strong></p><ul><li>The first step of this project was converting our DOM elements with data attributes into a Node list, and then into an array. In other words, “gather and group all of the web elements you want access to, then turn them into the type of data you can manipulate with JavaScript methods.” In <a href="https://gomakethings.com/converting-a-nodelist-to-an-array-with-vanilla-javascript/">investigating this process</a>, I learned that querySelector() and querySelectorAll() are <em>browser</em> APIs, and not JavaScript specific — because of this, they return Node lists (usable in other programming languages), and not arrays. To work with the data more effectively in JS, we need to turn those Nodes into arrays! The simplest way to do this is to wrap your “document.querySelector” code in the Array.from() method, pictured below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*zyRZYYjlU3INEmqZ0TiugQ.png" /></figure><ul><li>As I was trying to figure out the project prior to following along with the tutorial, I could not for the life of me figure out a succinct way to translate the minutes/seconds notated times (“6:53”) into just seconds. The teacher’s recommendation was to use the .split method on the time strings, which seems like the perfect solution! The syntax for using .split is to write the string, append .split, and specify the character you want to string to split around. For instance: / <strong><em>“6:53”.split(‘:’)</em></strong> /. The coolest part of this method is that it returns an array of the two split portions of the string: / <strong><em>[‘6’, ‘53’]</em></strong> /. Now that we can target array index numbers, I have a better sense of how we’ll use simple math to convert these values into seconds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*8MMH0hpVPw47245gz_MJjw.png" /></figure><ul><li>We learned about the “mod” symbol today, which is the percentage sign “%”. Mod is used with math in JS to return a value that is essentially the remainder from an equation. If you wrote “11 % 5”, you would get a return value of 1 — this means “5 goes into 11 twice, and then you have a value of 1 remaining.”</li></ul><p><strong>Blindspots</strong></p><ul><li>We used more ES6 “destructuring” in today’s project, so I want to make it a point to return on Monday to the cheatsheet I found yesterday and really break this down for myself!</li><li>We used parseFloat to turn strings back into numbers in today’s project, which I’ve seen before, but is one of those terms who’s name does not make sense with it’s functionality. I could benefit from researching this method more.</li><li>The code within the seconds variable is all readable to me, but at this point I would never have thought to stick so much functionality inside of a variable. My instinct probably would’ve had me write a function called “toSeconds” or something, and then try to apply that function to the timeNodes array. It was a new phenomenon for me to see a variable defined with so many methods on it, and I’m curious about it.</li></ul><p><strong>Breakdown</strong></p><p>We used <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map">.map()</a> for so much in today’s project, and it was one of my blindspots yesterday! Here’s a little <a href="https://codepen.io/cheisentrout/pen/PobVjbR?editors=0012">CodePen exercise</a> I wrote using .map(). Essentially, you use .map() when you want to run a callback function for each element in an array, and return a new array based on the function you ran. What hasn’t clicked for me in the past is why this particular method is called “map”, so here’s my way of making it make sense to myself: it’s called “map” because you provide it “coordinates” (a callback function) and based on the coordinates you provided, you get location-specific results, in the form of a new array.</p><p>It’s a good idea to use .map() when you need to write other code that utilizes the new array. If you don’t need to integrate a new array, but rather just change an existing one, you can use .forEach() or for…in syntax instead. It was appropriate to use .map() in today’s project because we converted the dataset time values into a new format (seconds) and used the array created later in the code!</p><p>My commented code from today’s project is <a href="https://github.com/cheisentrout/JavaScript30/blob/master/18%20-%20Adding%20Up%20Times%20with%20Reduce/index-START.html">here</a>, and I’ll be back on Monday for some “unreal webcam fun”. Alrighty!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b13de49d953" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 17]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-17-6988446b16ca?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/6988446b16ca</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Thu, 11 Mar 2021 19:57:58 GMT</pubDate>
            <atom:updated>2021-03-11T19:57:58.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 17</h3><p><em>Using the </em><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort"><em>Array.sort()</em></a><em> method to alphabetize array elements, excluding their articles!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GluAEvmg2_7Tabv9oowrhw.png" /></figure><p><strong>Bits</strong></p><ul><li><a href="https://www.w3schools.com/js/js_regexp.asp">Regular expressions</a> are used in JS to perform text search and replace functions. In other words, you can use a regular expression to isolate parts of a string and remove them, returning only the pieces that you want. We do exactly this in the “strip” function we wrote for today’s project. The basic syntax of a regular expression is “/pattern to search for/modifications to the pattern” — AKA, enclosed between forward slashes. <a href="https://forum.freecodecamp.org/t/explain-the-uses-of-caret-in-regex/221855">This post</a> is helpful in terms of why we use a caret in the regex. Never forget <a href="https://regex101.com/">this resource</a> for using regex!</li><li>There seems to be a different way of “creating a DOM element” in JS — imagine that! (I am sure there are many, many ways.) Today, we mapped over an array, then used a template literal <em>including HTML tags</em>, the changing JS variable, and set it all to an existing DOM element’s innerHTML. Pictured below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*p_kOa4OrtBUB17RLViYHiQ.png" /></figure><p><strong>Blindspots</strong></p><ul><li>In general, I don’t feel a sense of understanding about when and when not to use the “return” keyword. I’ve started slapping it all over the place, often, I believe, in places it is not necessary.</li><li>I could be clearer on the .map() method. I think this one trips me up simply because I haven’t made the connection between what the method is named (map) and what it does. The functionality doesn’t feel very “map-like” to me at present.</li></ul><p><strong>Breakdown</strong></p><p>Spent the morning with my dog at the vet, so today’s breakdown is going to be the planting of a seed to grow at a later date! I found some good resources for familiarizing myself with the unfamiliar ES6 syntax from yesterday, and I have a feeling <a href="https://devhints.io/es6">this cheatsheet </a>will be super helpful.</p><p>Commented code from today’s project is, as ever, <a href="https://github.com/cheisentrout/JavaScript30/blob/master/17%20-%20Sort%20Without%20Articles/index-START.html">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6988446b16ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 16]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-16-5a08ea7488f8?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a08ea7488f8</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Wed, 10 Mar 2021 20:14:18 GMT</pubDate>
            <atom:updated>2021-03-10T20:14:18.410Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 16</h3><p>Mousemove shadow effect magic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*Rh0jkzbf-fkjlt8ABBR89A.png" /></figure><p>Today’s project focused on using the “mousemove” event to trigger responsive text shadows! This technique can also be used on mobile devices, but rather than a mouse moving, it responds to the amount you tip your device side to side.</p><p><strong>Bits</strong></p><ul><li>Something a lot of these JS30 projects have focused on lately is page position, or creating variables to represent coordinates on a browser window (or on an element within the browser). I’m starting to get a better idea of the information we need to store as JS variables in order to create functions that rely on coordinates from the browser: the width and height of the element our event listener is placed on, as well as the offsetX and offsetY coordinates registered by any mouse event.</li><li>When setting the position of our various <a href="https://www.w3schools.com/cssref/css3_pr_text-shadow.asp">text shadows</a> (there are four of them in the image above), I felt I grasped the functionality of template strings more clearly than I have before. Our xWalk and yWalk values are JS variables that change (and change rapidly) based on the position of our mouse. To write CSS properties that should adjust based on a browser event, you create a JS variable that stores the oft-changing values, and putting those JS variables into template strings allows your style properties to update just as frequently and fluidly.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*vab9NyQwAEehzN3NkZxRnA.png" /><figcaption>Code for positioning text shadows, based on the mousemove event!</figcaption></figure><p><strong>Blindspots</strong></p><ul><li>We touched upon some ES6 syntax in this project that I need to do some more research into to understand. I’ll include a picture of my initial attempts to comprehend it here:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*xZMInJZGs7EfLoQAcweqZw.png" /></figure><ul><li>I wasn’t super clear on using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/target">event target</a> property in the “if” statement meant to adjust x and y values for the h1 element. I went back into my program and logged both “this” and “e.target” to the console to see if I could gain more clarity. I suppose that because the shadow function is linked to the mousemove event, which are both attached to the “hero” div, the event target is always going to be the hero div. However, it seems like “this” changes based on which element the mouse is hovering over. This concept feels like it will sink in over time and with practice, but we aren’t quite there yet.</li></ul><p><strong>Breakdown</strong></p><p>I’m briefly revisiting my <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">JSON.stringify()</a> method blindspot from yesterday! It honestly helped a lot just to re-Google “what does JSON stand for”. Once I remembered that it stands for “JavaScript Object Notation”, I realized that any method attached to JSON is going to be related to how object data is written (notated?). In the case of .stringify(), we pass objects into this method, and they emerge as strings. If we wanted to reverse the effect (convert a string of key-value pairs back into an object), we could use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse">JSON.parse()</a>.</p><p>There’s a whole lotta comment in today’s code. I realize that it doesn’t leave my code looking *super clean*, but my hope is that each of these projects will be little receptacles of knowledge that I can return to when working on other programs! You can find my comment-y code <a href="https://github.com/cheisentrout/JavaScript30/blob/master/16%20-%20Mouse%20Move%20Shadow/index-START.html">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a08ea7488f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 15]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-15-587c735949d?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/587c735949d</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Tue, 09 Mar 2021 18:26:05 GMT</pubDate>
            <atom:updated>2021-03-09T18:27:26.428Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 15</h3><p>Local Storage and Event Delegation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*57UUHdpj6zqNLy029MJalQ.png" /><figcaption>(Please disregard my silly test phrases.) Design by Wes Bos.</figcaption></figure><p>Today’s project addressed two brand new (to me) concepts — using localStorage in your browser to preserve data from user inputs, and event delegation to apply event listeners to elements that don’t yet exist.</p><p><strong>Bits</strong></p><ul><li>In this exercise, I was reminded that we can grab the input value of an HTML form by accessing it through the DOM, and using the .value property to store the input data in a variable. Creating variables can be a way of simply shortening otherwise lengthy lines of code. Because we store the input form’s data in a variable called “text”, we can simply use “text” in our item object code block, rather than having to write out the path to access it in the DOM.</li><li>A technique that was new to me (or perhaps just sank in for the first time) today was using “return” to create an HTML element. Previously, I had thought you had to use the document.createElement() method. In this project, I saw that you can write a function which returns an element that didn’t exist before. In this case, we use the “return” keyword, and then wrap the HTML for the element being created inside backticks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*drvk6bPVB5a6B4y5sww5qQ.png" /></figure><ul><li>Your browser has a built-in function called “localStorage”, which allows you to see information that has been stored, or entered, on your webpage. If you go to the Applications tab of Chrome DevTools, you can click the file or link of which you want to see the local storage.</li><li>This is a bit of information that’s a gateway to a whole bunch of information I DON’T comprehend yet, but — you gotta start somewhere: if you want to assign event listeners to elements that might not have been added to the page yet (such as checkable list items added by a user), you need to do so by addressing the parent element of the future child-elements. The parent element already exists on the page (in this case, the empty &lt;ul&gt; that will hold the elements from the “items” array), so it can handle your event delegation. It works like this: listen for an event on an element one level higher than the element you actually want to get at. Within the function triggered by the event listener, make sure that the first thing you do is check to see if the target matches the HTML child element — AKA, the element you actually want to the function to apply to.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1KLWrTWS0QKAvFkfhW817w.png" /><figcaption>A piece of code I need to work to understand more deeply — touches on event delegation and local storage.</figcaption></figure><p><strong>Blindspots</strong></p><ul><li>A goal I’m setting for myself on the next JS30 project that involves a user interface is to start the project by exploring the final product file, and noting as much functionality as possible before even starting the tutorial. There are so many micro-functions I’m used to (as a user) that I barely notice they need to be written as a developer. For instance, in today’s project, I realized we needed functionality that would “clear” the input form after an item had been added to the list. That’s something that, in my user brain, I just took for granted.</li><li>Passing parameters to functions still feels unsteady to me. I know it’s a really powerful functionality that allows you to repurpose code in a way you otherwise could not, but in this project we passed the populateList function a parameter of an empty array called “plates”. Sometimes function parameters feels like the wild wild West to me — anything goes! I just don’t get… where it goes.</li><li>We’ve used JSON.stringify() in the two most recent projects — I understand the basic functionality (turn non-string data types into strings), but I’d benefit from diving deeper into this, as well as its counterpart, JSON.parse()!</li></ul><p>I had planned to address .concat() or ES6 spread today in my breakdown, but today’s JS30 project took me so much longer than usual! I’m moving on to my fundamentals classes, where I’m building a random meal generator. That’s a whole different struggle! Back tomorrow for more.</p><p>Commented code <a href="https://github.com/cheisentrout/JavaScript30/blob/master/15%20-%20LocalStorage/index-START.html">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=587c735949d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 14]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-14-451c0c241cde?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/451c0c241cde</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Mon, 08 Mar 2021 16:25:24 GMT</pubDate>
            <atom:updated>2021-03-08T16:38:39.203Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 14</h3><p>Today we’re working on exercises that illustrate the differences between JavaScript references and copies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qDNfLxh7q62lohYzMlcy0A.png" /><figcaption>One reason you might want to create an object instance is… to write a digital version of yourself in the case that you were ever in a grumpy mood! You aren’t PERMANENTLY in a grumpy mood, so don’t change your original self honey!</figcaption></figure><p><strong>Bits</strong></p><ul><li>References and copies work differently for different data types. For instance, if you update an array reference value, it will mutate (change) the original array. If you update a string, number, or boolean value using a reference variable it will not update the value of the original variable. In the example below, you can see that the “original variable” is age, and the “reference variable” is age2, which is used to store the value of the age variable. When you update age2, it does not affect the value of age.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p6NpTU0r9Jjux8zHsTVzsQ.png" /></figure><ul><li>Of the methods discussed to create copies (rather than references) of arrays, I preferred using Array.from, or the ES6 spread function. You can use either of these to create a mutable copy of an existing array — the result of using these methods is that you will be allowed to edit the copied array without changing the original.</li><li>One reason you might want to make a copy of an object is to create an instance of that object which has some new properties added to it. Say you were getting a Blizzard from Dairy Queen, and it had the properties of “medium” and “vanilla”, and your friend wanted a Blizzard that had those properties, plus m&amp;ms. You could make a copy of the original Blizzard using the Object.assign() method, and add new property values to it. The syntax for using Object.assign() is as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8H4atQVMZ5W-Dbd_bCqw5g.png" /><figcaption>Here’s the code for the blizzard object in my document…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDPZC6lBVFZrmJUSTagccQ.png" /><figcaption>…and here’s what happens when you log both “blizzard” and “withCandy” to the console!</figcaption></figure><p><strong>Blindspots</strong></p><ul><li>We discussed the .concat() method as an option for creating a copy of an array, and my current understanding of .concat() does not cover why we would be able to do so.</li><li>The ES6 “spread” method seems to be coming up in a lot of these JS30 projects. I’d like to be more informed about how recently it was introduced, and it’s functionality.</li></ul><p><strong>Breakdown</strong></p><p>This was a really fun breakdown for me! I went back to Friday’s project and dove deeper into the <a href="https://css-tricks.com/almanac/properties/t/transform/">CSS transform property</a>. I wanted to see if I could create a super simple animation using transform (translateX) and an event listener in JS. Success! Here’s my <a href="https://codepen.io/cheisentrout/pen/poNKKQe">CodePen exercise</a>.</p><p>Last but not least, my commented code from today’s project is <a href="https://github.com/cheisentrout/JavaScript30/blob/master/14%20-%20JavaScript%20References%20VS%20Copying/index-START.html">here</a>! Catch you on the flip side.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=451c0c241cde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 13]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-13-9d03a83ed24d?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d03a83ed24d</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Fri, 05 Mar 2021 17:31:27 GMT</pubDate>
            <atom:updated>2021-03-05T17:31:27.756Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 13</h3><p><em>Learning how to slide images in on the scroll event!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*amIGUi6MERN7-BsqBtWn8w.png" /></figure><p><strong>Bits</strong></p><ul><li>Debounce functions work with any scroll-related event listeners, and as a rule should be used in tandem with them. Why? Since “scroll” is an event that occurs many times (and rapidly) as you navigate up or down a webpage, it can become a performance issue to fire an event related to scroll every single time it’s triggered. Debounce moderates how often the scroll event fires! In this project, the lead dev simply grabbed a debounce function from a web search, which I’m sure I’ll need to use at a later date.</li><li>The window.scrollY function, when logged to the console, can tell you how far you’ve scrolled down a webpage in pixels. Throughout this project, I feel like I gained a lot of familiarity with logging browser events related to page position. We had to use a few math equations to determine when (or rather, <em>where</em>) on the page events should be triggered, which involved using a lot of built-in window properties.</li><li>This project made me realize that, in writing my pseudocode, I’m still not thinking quite like a computer would… mainly in the sense that I’m not breaking operations down as far as they need to go. Pictured below, you can tell that I knew we’d need to apply CSS properties to images when the scroll event was triggered, but I didn’t think through all the equations we’d need to write to determine the browser position in the first place.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tdrGygXH8OoW815UJ_c33w.png" /></figure><p><strong>Blindspots</strong></p><ul><li>Using CSS “transform” property to hide and reveal photos, using translateX and translateY. Also the “scale” property within transform. In JS30 so far, I feel like a deep understanding of the interconnectedness of CSS and JS will be very important moving forward. Lots of visual effects are achieved by writing them in CSS selectors, then applying that selector (or class) in JavaScript according to a user interaction.</li><li>Related to my first blindspot, I want to learn more about properties like “offsetTop”, which we used to calculate the bottom of an image position.</li></ul><p><strong>Breakdown</strong></p><p>We write “-secretCode.length -1” when working with array.length() because: arrays are “zero-based” data structures, meaning each element in an array is given an index number, and the first array element’s index is “0”. The .length() method, however, is “one-based”, meaning it tallies all items in a given array, regardless of the index position they’re in. When it comes to .length(), we’ll be returned the <em>total number of elements in a group</em>, not the summation of their index numbers.</p><p>We subtract one from the array’s length in order to make sure the returned value is an actual element that exists, as the elements that exist in the array will always be one less than the array’s length.</p><p>What I am still stuck on is the purpose of the “-” in front of the array.length(). Waiting to hear back from some coding buddies on this!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d03a83ed24d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 12]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-12-16af2355bff3?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/16af2355bff3</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Thu, 04 Mar 2021 15:46:05 GMT</pubDate>
            <atom:updated>2021-03-04T15:46:05.014Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 12</h3><p><em>Working on the basics of key sequence detection!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KnHU0Fa5xgLh1Ly0a7YMvg.png" /><figcaption>Using my secret code (koala!) to add unicorns and rainbows. L. O. L. #lisafrank #mylittlepony</figcaption></figure><p><strong>Bits</strong></p><ul><li>This was a relatively short project, and one of the first where my attempt at pseudocode pretty closely matched the solution structure! Something I need to remember and implement more often is using variables to contain information. In pseudocode, I wanted to use a string within my function to define the secret code — however, in the solution code, the secret code string was defined as a variable outside the function, which is much cleaner and more mutable.</li><li>Got to practice passing “e” as a function parameter after my work on it yesterday! This time, we were tracking the “keyup” event, and whenever that event occurred, we took the event’s “key” property and pushed it into an array. I definitely understood this better from my work on yesterday’s project, and reviewing how events are regarded as objects in JS.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEnjCbeDAnulVPKMjnhOgg.png" /><figcaption>My pseudocode attempt at solving the problem!</figcaption></figure><p><strong>Blindspots</strong></p><ul><li>I don’t fully grasp why we’d use a line of code like this: (-secretCode.length -1). I think the “-secretCode.length” means that we approach reading the array from the end to the beginning, antithetically to the left-right default read. Then when we subtract 1, I believe it’s because the number of items in an array (which are zero-based) is always one less than it’s length. I’m not totally clear on this, though.</li></ul><p><strong>Breakdown</strong></p><p>Today, I took some time to get familiar with the HTML <a href="https://www.w3schools.com/tags/tag_input.asp">&lt;input&gt;</a> tag, which we used for several pieces of yesterday’s video player. I learned that the “type” attribute of the tag is the most important one, and has the most potential values, such as: number, checkbox, range, text, and so many more. Depending on the type attribute, the &lt;input&gt; tag not only appears differently on the page, but accepts different types of information. This will be the go-to tag when inputting a user’s email address (type=’text’), e-sign situations in which you need to specify the date of a signature (type=’date’), or even file uploading (&lt;input type=’file’&gt;).</p><p>Today’s project was shorter, and it was nice to have a little breather. Tomorrow we’ll be working on a “slide in on scroll” feature, which I’m excited about!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16af2355bff3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript30 — Day 11, Pt. 2]]></title>
            <link>https://cheisentrout.medium.com/javascript30-day-11-pt-2-ceca1a6c00f7?source=rss-639f20292e96------2</link>
            <guid isPermaLink="false">https://medium.com/p/ceca1a6c00f7</guid>
            <dc:creator><![CDATA[Clare Eisentrout]]></dc:creator>
            <pubDate>Wed, 03 Mar 2021 17:13:37 GMT</pubDate>
            <atom:updated>2021-03-03T17:13:37.635Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript30 — Day 11, Pt. 2</h3><p><em>Continuing to work through building a custom HTML video player with controls like play/pause, volume range, video speed, and skip buttons.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PsbxV0ipD2g6YqagnFnawA.png" /><figcaption>Design by Wes Bos for JavaScript30.</figcaption></figure><p>Today I picked back up where I left off yesterday with the custom video player!</p><p><strong>Bits</strong></p><ul><li>If you use an event listener to call a function on an element, you can then use “this” to refer to the element within the function body. I created a little <a href="https://jsbin.com/gufubijehu/edit?html,css,js,console,output">JSBin exercise</a> to confirm that “this” is true, hehehe…</li><li>In writing the scrub function, we initially passed “e” as a parameter, and console logged the event to learn more about it. The function was connected to an event listener, so when we clicked on the progress bar, we got a mouse event message in the console. One of the properties of this mouse event was “offsetX”, which told us how far into the progress bar we had clicked… I think! Then, we used offsetX as part of the equation to determine the percentage to update the video play when the progress bar was manually adjusted. I can’t 100% elucidate how this works, but more so my revelation is about all of the information you can glean when you console.log an event!</li></ul><p><strong>Blindspots</strong></p><ul><li>I cannot seem to get the console to log the handleRangeUpdate function — even when I connect the solution JS script, nothing logs to the console. The slider bar simply turns green. (<strong><em>FIVE MINUTES LATER</em></strong>) It was a simple typo in hooking up my HTML — instead of selecting the class of ‘.player__slider’, I had only used one underscore: ‘.player_slider’. Wow. Most of the time something is amiss, it’s a little silly typo like that. You’ve gotta know how to comb.</li><li>All of the properties you can add to an input tag in HTML. It seems like you can control the volume range just through the input tag. How?</li></ul><p><strong>Breakdown</strong></p><p>I’ve spent the last half hour or so looking into <a href="https://stackoverflow.com/questions/35936365/what-exactly-is-the-parameter-e-event-and-why-pass-it-to-javascript-functions">passing “e” as a function parameter</a>. What I can glean is that you pass “e” as a parameter when your function relies on grabbing some of the information from the event itself. For instance, in today’s project, we passed “e” as a parameter for the scrub function, because in order for the function to work, we needed the “offsetX” information generated by the event. I learned that an event is an object, and when you console.log an event, what you’re seeing when you expand the mouse event dropdown menu is a long list of properties attached to that event object. I’m still a bit muddy on the syntax of this, however — a little confused about how why, sometimes, what’s passed in a function’s parentheses is a “parameter”, while other times it’s an “argument”. When passing “e” to a function, why do we not treat it like a variable, able to be changed when we fire the function it’s passed to?</p><p>This was a big, long, complex JS project for me! Yesterday, I was feeling nervous about having worked on JS for about 6 weeks now, and still needing a ton of support to get through projects- so I Googled “how long does it take to learn JavaScript?” Here’s the answer that helped get my mind right:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eodjWBn6S_hfQwbIo8ecfg.png" /></figure><p>Just in case you’re in the same, or a similar, boat. I see you. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ceca1a6c00f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>