<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aoppman</title>
    <description>The latest articles on DEV Community by Aoppman (@aoppman).</description>
    <link>https://dev.to/aoppman</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1063428%2F79392b77-3130-4418-856e-bbd16cc201b8.png</url>
      <title>DEV Community: Aoppman</title>
      <link>https://dev.to/aoppman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aoppman"/>
    <language>en</language>
    <item>
      <title>useState - don't get Hooked 🪝</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Sat, 07 Oct 2023 07:09:47 +0000</pubDate>
      <link>https://dev.to/aoppman/usestate-dont-get-hooked-3hpa</link>
      <guid>https://dev.to/aoppman/usestate-dont-get-hooked-3hpa</guid>
      <description>&lt;p&gt;Hooks are tools in the React library that allows developers to "hook into" React "state" when writing function components.&lt;/p&gt;

&lt;p&gt;React Hooks consist of..&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;useState Hook&lt;/li&gt;
&lt;li&gt;useEffect Hook&lt;/li&gt;
&lt;li&gt;useRef Hook&lt;/li&gt;
&lt;li&gt;useCallback Hook&lt;/li&gt;
&lt;li&gt;useMemo Hook&lt;/li&gt;
&lt;li&gt;useContext Hook&lt;/li&gt;
&lt;li&gt;useReducer Hook&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;useState&lt;/code&gt; is one of the two main React hooks I learned on my coding journey so far. Although &lt;code&gt;useState&lt;/code&gt; is only one of the many React hooks, it is an important one, as it allows you add a state variable to a component. &lt;/p&gt;

&lt;p&gt;The first step that is required to utilize React Hooks such as &lt;strong&gt;useState&lt;/strong&gt;, is to &lt;u&gt;import&lt;/u&gt; the Hook of choice from the React library.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qmeChu_s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nbx18azb9q4k4bxel0m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qmeChu_s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nbx18azb9q4k4bxel0m.png" alt="Image description" width="800" height="98"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;/p&gt;

&lt;p&gt;We write this line of code in an "out of the ordinary" format using an array that is then destructured, providing two variables in one declaration.&lt;br&gt;
&lt;code&gt;(useState declaration)&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FXi_ySqb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uapgfpo0di7ziuspvqsx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FXi_ySqb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uapgfpo0di7ziuspvqsx.png" alt="Image description" width="800" height="73"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The syntax for declaring a state variable with &lt;code&gt;useState&lt;/code&gt; looks quite odd and can be confusing, but with practice, it becomes familiar.&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The first variable in the array is always the &lt;strong&gt;'state'&lt;/strong&gt; variable. &lt;/li&gt;
&lt;li&gt;The second is a variable that will be used as the &lt;strong&gt;'setter function'&lt;/strong&gt;, for updating the state variable.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;u&gt;&lt;em&gt;It is good practice to name the "setter function" variable after the state variable, using the term "set".&lt;/em&gt;&lt;/u&gt;&lt;br&gt;
Initializing with the &lt;code&gt;const&lt;/code&gt; declarative, we define the array of two variables to equal '&lt;code&gt;useState()&lt;/code&gt;'. Inside the parenthesis we pass in the default value for the state variable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [timer, setTimer] = useState("00:00")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Here we set the initial value *(of any data type) for the state variable (first variable in the array) "timer" to hold the constant value of a string - "00:00"&lt;br&gt;
Also, we have the setter function (second variable in the array) that is used to update the value of the state variable, hence the clear and concise name - "setTimer".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Constant&lt;/em&gt; "&lt;code&gt;const&lt;/code&gt;" &lt;em&gt;variable declarations assign a value that cannot be re-assigned after declaring it. This is where we see the power of the setter function, as it is the only way to update/change the value of the state variable.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I bet that funky array declaration syntax is making a little more sense now, right?&lt;/strong&gt; 🤔&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;.. One crucial piece of information I cannot forget to mention, is where to declare &lt;code&gt;useState&lt;/code&gt;! The useState declaration must be at the top most level of a function component, prior to the "return".&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IKvA-5NK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v0s803pcbhhgy5e55pfq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IKvA-5NK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v0s803pcbhhgy5e55pfq.png" alt="Image description" width="800" height="174"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;(continuing the code from the example snip above)&lt;/code&gt; - &lt;em&gt;let's see the setter function in action!&lt;/em&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dwVy4nrb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t02v5fnismsgkwh21w7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dwVy4nrb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t02v5fnismsgkwh21w7u.png" alt="Image description" width="800" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here we have a function called "handleClick" - with just a little logical thinking and coding knowledge, we can assume that this function refers to the click of a 'button' UI element.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Upon clicking said button, the "handleClick" function, will return the 'setter function' for updating the value of the state variable. Provided with a new designated 'state' value passed into the setter function (encapsulated in the parenthesis)...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Now with the click of the button element, &lt;code&gt;useState&lt;/code&gt; does its thing, and re-renders the component onto the DOM with the new/updated state value for the variable "name".&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;
&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;/p&gt;

&lt;p&gt;State can pertain to a single component, or can be declared and held in one parent component, that returns multiple child components - in which state, and useState can be passed down as props. In doing so we can access, utilize and update state via child components. This gives us the option to re-render these different components/UI elements based off the original state and the ability to change the value/functionality within a child component individually.&lt;/p&gt;

</description>
      <category>react</category>
      <category>html</category>
      <category>softwaredevelopment</category>
      <category>coding</category>
    </item>
    <item>
      <title>Variety with *Variables* 😏</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Wed, 02 Aug 2023 03:13:39 +0000</pubDate>
      <link>https://dev.to/aoppman/variety-with-variables-3ig5</link>
      <guid>https://dev.to/aoppman/variety-with-variables-3ig5</guid>
      <description>&lt;p&gt;Throughout my journey in front-end software development, and learning the computer language that is known as JavaScript, it has been a bumpy and rewarding road. One of my favorite things about coding in JavaScript, and also one of the most basic things that coders will learn in the very beginning, is variables!&lt;/p&gt;

&lt;p&gt;A JavaScript "variable" is basically a container to store data to later be called on for utilization.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;(definition according to https://javascript.info)&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qrvqLQfm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qgjyahd8zcg25ctlcrd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qrvqLQfm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qgjyahd8zcg25ctlcrd.png" alt="variable definition" width="800" height="95"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Variables, in my opinion, are crucial and extremely  versatile, as they can store a wide range of types of JS data.&lt;/p&gt;

&lt;p&gt;When it comes to variables there are a few ways to declare variables. The declaration words used for variables are :&lt;br&gt;
&lt;code&gt;let&lt;/code&gt; &amp;amp; &lt;code&gt;const&lt;/code&gt; - with the long forgotten &lt;code&gt;var&lt;/code&gt; but we won't focus on that one for now.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;const&lt;/code&gt; (otherwise known as "constant") variable declaration, is a &lt;u&gt;concrete&lt;/u&gt; declaration, in which the value can not be changed after assignment (as well as the value of the variable must be assigned at time of declaring it).
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gbtelsCH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/moy47lxbmtbxblkdl3pq.png" alt="const" width="800" height="154"&gt;
&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;let&lt;/code&gt; variable declaration on the other hand allows the variable's value to be changed after it is declared - unlike &lt;code&gt;const&lt;/code&gt; - (as well as the variable can be declared first, with or without assigning a value - the value can then be assigned later in the code).
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KAh77g5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1734ztbajh6z63wlhp4j.png" alt="let" width="800" height="203"&gt;
Variables can store data types such as...&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Numbers &lt;code&gt;(ex. 1, 23, 200, 1001, 3.1459)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const age = 15
let number = 11
&lt;/code&gt;&lt;/pre&gt;


&lt;ul&gt;
&lt;li&gt;Booleans &lt;code&gt;(ex. true, false)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const truthyValue = true
let falseyValue = false
&lt;/code&gt;&lt;/pre&gt;


&lt;ul&gt;
&lt;li&gt;Strings &lt;code&gt;(ex. "Hello", "Welcome", "Today's date is:")&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const greeting = "Hello"
let thankYouMessage = "Thank you for your service"
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;p&gt;Data collections can also be saved to a JS "variable" for easier access in instances where they may be called repeatedly, this saves coders time and typing. &lt;br&gt;
(these include)..&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Arrays &lt;code&gt;(ex. [1, 2, 4, 8, 16] ; ["red", "blue", "green", "yellow"])&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const lotteryNumbers = [13, 24, 43, 55, 72]
let dogs = ["shih tzu", "pug", "hound", "poodle"]
&lt;/code&gt;&lt;/pre&gt;


&lt;ul&gt;
&lt;li&gt;Objects &lt;code&gt;(ex. {Year: "2019", Make: "Ford", Model: "Fusion"})&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let person1 = {
firstName: "Chris",
lasName: "Smith",
age: 27,
sex: "male"
}
&lt;/code&gt;&lt;/pre&gt;


&lt;ul&gt;
&lt;li&gt;Functions &lt;code&gt;(i.e. anonymous/arrow functions) * instead of a function declaration using the "function" keyword, a "variable" can be utilized to store the function - in which you would invoke the function using the variable name followed by "()" similar to a normal function call *&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let add = (num1, num2) {
num1 + num2 = sum;
return sum;
}
const newMessage = (string) =&amp;gt; `Welcome to ${string}`
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;p&gt;Another aspect where variables come into play across the coding environment is when working with HTML, in something called &lt;em&gt;&lt;u&gt;manipulating the DOM&lt;/u&gt;&lt;/em&gt;. Within this process you are able to grasp HTML 'elements' utilizing Javascript methods that allow interaction with these elements. We can then assign them to a JS variable in which it can be stored for later and accessed or referenced throughout the connecting JS code.&lt;/p&gt;

&lt;p&gt;for example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;Hello, Welcome to my website!&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;br&gt;
say we have a 'paragraph' HTML element that we want to access and manipulate using JS code.&lt;br&gt;
We would grab it with a JS method called the 'querySelector' method. - And we could capture the element and assign it to a variable all in one action!&lt;br&gt;
&lt;code&gt;const p = document.querySelector('p')&lt;/code&gt;&lt;br&gt;
this would evaluate to&lt;br&gt;
&lt;code&gt;p = &amp;lt;p&amp;gt;Hello, Welcome to my website!&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Lastly, I like to take into consideration when it comes to &lt;code&gt;variables&lt;/code&gt; is function 'parameters'.. parameters are what I would consider a &lt;em&gt;"ghost-like"&lt;/em&gt; variable that is used as a placeholder for a value that will be passed though a JS function and factor into the conditions of the function. Somewhat of an "anonymous" variable if you will - some may not agree with my wording but this is just me putting my owns thoughts, in my own words, on paper.&lt;br&gt;
(Don't shoot the messenger 😅)&lt;/p&gt;

&lt;p&gt;&lt;u&gt;let's use the previous example as it fits the bill :&lt;/u&gt;&lt;/p&gt;

&lt;blockquote&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function add = (num1, num2) {
num1 + num2 = sum;
return sum;
}
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;here "num1" &amp;amp; "num2" are parameters - ideally place holders for values to be passed into the function and 'added'&lt;br&gt;
... but to the naked eye they resemble variables, no? 🤔&lt;br&gt;
so in the case that I call the function &lt;code&gt;add(3, 4)&lt;/code&gt;&lt;br&gt;
I am temporarily assigning "num1" the value of '3' &amp;amp; "num2" the value of '4'. So the function will run and do the job of '3 + 4' to = '7' and set that as the value of "sum".&lt;br&gt;
So.. within the function, logically (in my head at least) we are saying :&lt;br&gt;
&lt;code&gt;num1 = 3;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;num2 = 4;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;sum = 7;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;*Remember this is just within the functions scope, these place holder/temporary "variables" can change value through the function, and can only be accessed and utilized within the scope of the function itself.&lt;/p&gt;

&lt;p&gt;With all that aside, as you can see variables have a wide range of functionality and are extremely versatile and flexible. You can make your code shorter and sweeter by using variables to the best of your ability, especially when re-using the same value or data collection repeatedly throughout a website or program. They are a staple in any code and a JavaScript standard. Love 'em or hate 'em, they're here to stay, so it's best to become comfortable creating and utilizing them to the fullest!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>coding</category>
      <category>softwaredevelopment</category>
      <category>frontend</category>
    </item>
    <item>
      <title>JSON</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Thu, 08 Jun 2023 07:12:17 +0000</pubDate>
      <link>https://dev.to/aoppman/json-241g</link>
      <guid>https://dev.to/aoppman/json-241g</guid>
      <description>&lt;p&gt;JavaScript Object Notation or "JSON" for short - is a data format that utilizes a syntax that closely resembles that of JavaScript objects. The data is in a "human-readable" text format and usually consists of strings written in the form of JavaScript &lt;em&gt;objects&lt;/em&gt;, containing "keys" and "values". Then, we can further group these objects into &lt;em&gt;arrays&lt;/em&gt;, another JS data type that is familiar to new and experienced developers. Let's not forget to mention, like in the basic JavaScript object, JSON also allows the use of JS data types such as numbers, booleans and &lt;em&gt;object&lt;/em&gt; &lt;strong&gt;methods&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--15zDd_y5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/794l0wcophjdndlgmpw2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--15zDd_y5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/794l0wcophjdndlgmpw2.png" alt="JS Object" width="549" height="144"&gt;&lt;/a&gt; &lt;code&gt;(Basic JS object - only the object values *consisting of the string data type require double quotations/quotation)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lSZqKbHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yx2gisuww4s7nhq30irb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lSZqKbHM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yx2gisuww4s7nhq30irb.png" alt="JSON Object" width="440" height="80"&gt;&lt;/a&gt; &lt;code&gt;(Basic JSON string - resembling a JS object but all text must be wrapped in double quotations)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Although appearing as JavaScript, many different programs are able to parse as well as generate JSON. It is used to to send data from a server to the client, as well as send client data to a server.&lt;/p&gt;

&lt;p&gt;JSON data can be saved in its own file, consisting of a text document/file using the ".json" tag name. Along with an ".html" file, and a ".js" file - we can manipulate, request and receive data displayed on a webpage.&lt;/p&gt;

&lt;p&gt;JSON is another stepping stone in the current learnings I am undergoing in my software development journey. This is another part to the bigger picture I touched base on in my previous blog post about - Manipulating the DOM. &lt;/p&gt;

&lt;p&gt;In my next few blog posts I will go over more on this topic and break down how using JSON, we can send and receive data using postman, "fetch" and the different types of HTTP requests they entail, working with the JSON server.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>html</category>
    </item>
    <item>
      <title>HTML Function-ality</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Sun, 14 May 2023 06:19:51 +0000</pubDate>
      <link>https://dev.to/aoppman/html-function-ality-4019</link>
      <guid>https://dev.to/aoppman/html-function-ality-4019</guid>
      <description>&lt;p&gt;Continuing the discussion of JavaScript functions, I have covered the general outline of a &lt;em&gt;function&lt;/em&gt; - as well as &lt;em&gt;Anonymous functions&lt;/em&gt;. I still have to touch base on &lt;em&gt;Callback functions&lt;/em&gt;, and now is the perfect time as my current learning topic is manipulating the DOM (The Document Object Model) via HTML using JavaScript code. Over the last week while diving into this subject, I have learned a little more about the inter-connections and functionality shared between HTML and JavaScript languages.&lt;/p&gt;

&lt;p&gt;When we are "manipulating the DOM", I am referencing temporarily editing or modifying HTML elements visually on a web page in real time. We do this using the &lt;u&gt;Web Dev Tools&lt;/u&gt; to access a console in the browser, and instructing these changes through JavaScript commands.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(pictured below is a webpage in Google Chrome, utilizing the Dev Tools console to implement changes with JavaScript code commands)&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Oq_z3vTh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huyfb6del8eczjjiyaiz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Oq_z3vTh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huyfb6del8eczjjiyaiz.png" alt="Image description" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When doing this it is crucial to utilize functions, anonymous functions, and callback functions, all of that good stuff. When manipulating the document we usually need to incorporate a callback function.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;&lt;u&gt;Callback Function&lt;/u&gt;&lt;/strong&gt; is a function passed as an argument into another function, and then is invoked inside the outer function to complete an action.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aTLvUUdY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/acznrnonoeo80khp4vf0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aTLvUUdY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/acznrnonoeo80khp4vf0.png" alt="Image description" width="521" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(Taking a look back at the earlier example, here you can see we have defined a function, and then used that function as a callback in another function action.)&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7zTInycg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjf153tfj61ymazio57f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7zTInycg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjf153tfj61ymazio57f.png" alt="Image description" width="345" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a busy student with a lot of work to do, I don't have enough time to get too in depth on this topic but figured I'd continue to share my new found knowledge. &lt;/p&gt;

&lt;p&gt;Until next time... 👋&lt;/p&gt;

</description>
      <category>html</category>
      <category>dom</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>More "FUN-ctions"</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Sun, 30 Apr 2023 05:16:54 +0000</pubDate>
      <link>https://dev.to/aoppman/more-fun-ctions-3j77</link>
      <guid>https://dev.to/aoppman/more-fun-ctions-3j77</guid>
      <description>&lt;p&gt;As promised, we are back with some more fun..&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_ZMpo7Kz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1w9224eiry1bjt7886o.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_ZMpo7Kz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1w9224eiry1bjt7886o.gif" alt="whoops" width="498" height="312"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Um, I mean functions&lt;/strong&gt;😅&lt;br&gt;
As, like myself, if you are on the uphill journey that is learning JavaScript - you are aware that trying to master functions is far from fun.&lt;/p&gt;

&lt;p&gt;In my last blog post I started discussing the general JavaScript function basics, such as (&lt;em&gt;inputs, actions,&lt;/em&gt; and &lt;em&gt;outputs&lt;/em&gt;).&lt;br&gt;
For this second iteration, I wanted to touch on other function variations.&lt;/p&gt;

&lt;p&gt;First, lets touch on the &lt;u&gt;Anonymous Function&lt;/u&gt;, this is relative to the basic function, just in a different format. This type of function is not required to use the declaration of 'function' keyword for creation. But instead can be declared with a variable and assigned a value of a function.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4hkCTCBJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66fbqfh43ec3ppi2idy5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4hkCTCBJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/66fbqfh43ec3ppi2idy5.png" alt="anonymous function" width="738" height="201"&gt;&lt;/a&gt;&lt;br&gt;
This just makes writing a function a little easier, maybe even cleaner. An added bonus is how the anonymous function factors into writing/utilizing &lt;em&gt;callback functions&lt;/em&gt;, as well as &lt;em&gt;arrow functions&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We will cover those variations and in more depth in the next few blog posts, continuing the function saga!&lt;/p&gt;

&lt;p&gt;Until then, continuing coding comrades👋&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>frontend</category>
      <category>learning</category>
      <category>coding</category>
    </item>
    <item>
      <title>Function(al) Thinking 🧠</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Thu, 20 Apr 2023 23:59:24 +0000</pubDate>
      <link>https://dev.to/aoppman/functional-thinking-4nle</link>
      <guid>https://dev.to/aoppman/functional-thinking-4nle</guid>
      <description>&lt;p&gt;&lt;strong&gt;Since the beginning of my coding journey, JavaScript functions have been an uphill battle.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Though, as the weeks have gone on, little by little I have been able to get bits and pieces of basic function structure to stick inside my scrambled brain. &lt;br&gt;
&lt;em&gt;- This has been no little feat&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It did not come in full, nor all at once. As I had to get flustered even further, to the point of total confusion before grasping the basic concept of &lt;strong&gt;functions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Inevitably, without full understanding of the basic function expression, the course work dove straight in to more variations of JS functions. Such as...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Callback functions&lt;/li&gt;
&lt;li&gt;Anonymous functions&lt;/li&gt;
&lt;li&gt;Arrow functions
... etc. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this blog post I'll start with further describing how we write a basic Javascript function.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lets begin with basic JS function!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Functions are blocks of code that take in &lt;strong&gt;inputs&lt;/strong&gt;, perform specific &lt;strong&gt;actions&lt;/strong&gt;, and produce &lt;strong&gt;outputs&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dNhLMGtY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9cmdhc2n84oarg26had.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dNhLMGtY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9cmdhc2n84oarg26had.png" alt="JS Function" width="274" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we see the function keyword and then a variable name "sum" which holds the value of the function. Next we have &lt;u&gt;inputs&lt;/u&gt; such as "num1" and "num2" which are variables holding values of their own. By placing these values in the parentheses "()", we are passing them into the function as parameters to hold an argument. Then within the function body we have the &lt;u&gt;action&lt;/u&gt;, which is to add the two values together using the (+) arithmetic operator. In return we will get the result of adding the two values, which is the &lt;u&gt;output&lt;/u&gt;.&lt;/p&gt;

&lt;p&gt;In my next few blog posts I will dive further into explain the other type of functions different ways they can be written.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>functional</category>
      <category>coding</category>
      <category>programming</category>
    </item>
    <item>
      <title>Kind comments😉</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Tue, 18 Apr 2023 07:05:20 +0000</pubDate>
      <link>https://dev.to/aoppman/kind-comments-5em8</link>
      <guid>https://dev.to/aoppman/kind-comments-5em8</guid>
      <description>&lt;p&gt;While I am still new to coding, as a Software Development student at Flatiron School, I am learning tips and tricks that best suit my learning experience. &lt;/p&gt;

&lt;p&gt;Although, I was hesitant at first, I am now a firm believer in commenting inside my code. I have realized it is crucial for my note taking style of self learning. Each person learns differently and incorporates their own strategies for success in soaking up the necessary knowledge. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;At the start of my learning, instructors introduced comments as a means for communication between coders, to leave directions/instructions for the code and what it does. This relays easy explanation to new eyes on a project, and was questionable and confusing to me at first.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;As I was still unaware visually, of what I was interpreting, comments confused me further. &lt;br&gt;
While my coding practice is evolving and I'm continuously beating this new found knowledge into my head, over and over until it finally soaks up, commenting has become a staple.&lt;/p&gt;

&lt;p&gt;Even though VS Code has become the main entity for my coding projects, it has also become my personal notebook for my course notes. The ability to comment notes in my own terminology as well as write out code examples in all its colorful glory is dynamic. This helps immensely, when having my personal learning material match the visual aesthetic that I encounter anytime I write code for coursework. It tickles my brain so good, as I'm a very "visual-to-hands on learner. &lt;strong&gt;(i.e. Monkey see and do 🐵)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GHS2MTx7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6kb9m138d0xv7o4cd3me.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GHS2MTx7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6kb9m138d0xv7o4cd3me.png" alt="Coding notes" width="656" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0DChsKXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lw2ukpkb662w6tzssbht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0DChsKXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lw2ukpkb662w6tzssbht.png" alt="Coding notes" width="644" height="691"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am able to further breakdown difficult equations and explain them to myself, in my own words and understanding in a line of comment - in real time as I am problem solving. &lt;/p&gt;

&lt;p&gt;I highly recommend getting comfortable with incorporating comments into your code along the way! &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Coding Subconsciously 🤯</title>
      <dc:creator>Aoppman</dc:creator>
      <pubDate>Wed, 12 Apr 2023 02:49:32 +0000</pubDate>
      <link>https://dev.to/aoppman/coding-subconsciously-5g80</link>
      <guid>https://dev.to/aoppman/coding-subconsciously-5g80</guid>
      <description>&lt;p&gt;Flashback to 2008, when Myspace ruled the internet and we publicly ranked our friends on merit due to how we were feeling that day.&lt;br&gt;
&lt;strong&gt;- I know TOXIC right?&lt;/strong&gt; 😅&lt;/p&gt;

&lt;p&gt;The only thing better than the feeling of re-arranging my friends list to make a statement, was editing my Myspace layout. I got such a creative thrill from the method of totally changing the visual aesthetic of my page. With the ability to modify just about every aspect of the layout and design, I felt free enough to express my individual creativity across the board. Receiving compliments on my page, as well as requests for tips and assistance in customization among others users, instilled confidence. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;All the while I was doing something bigger than I could even imagine... without even realizing it I was&lt;/em&gt; &lt;strong&gt;coding&lt;/strong&gt;&lt;em&gt;!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YwrwjZjz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zhbp6lqz6zr5s9nfc3bf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YwrwjZjz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zhbp6lqz6zr5s9nfc3bf.gif" alt="Ooops" width="498" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unknowingly I was writing and editing code in HTML (HyperText Markup Language) utilizing CSS (Cascading Style Sheets). This was invigorating as it was like writing a foreign language that I could not speak or barely understand, yet mindfully and visually I could yield results. &lt;/p&gt;

&lt;p&gt;Little did I know, I was dealing with exactly that, a language - a computer language!&lt;/p&gt;

&lt;p&gt;Since starting this Software Development cohort, I have revisited that feeling of self exploration. Although the road has just begun, we have already dabbled in HTML and CSS, on top of learning the beast that is the "JavaScript" language. One of the first assignments we have accomplished was creating a custom website, which is what re-activated the nostalgia. The deeper I dive into this endeavor, the more I realize my Myspace days were just the tip of the iceberg and coding goes so far beyond that surface.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is just a little back story in what got me interested in coding to begin with. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Present day, as a logistic specialist for Amazon who has been doing this work for for a few years now, I am surrounded by code in everything I do and I have only become more invested in getting my hands dirty. While working with multiple Amazon software outlets, shared docs and spreadsheets that are all jam packed with code below the face-level. I am determined to gain the ability to peel back the outer most layer and really learn what lies beneath. &lt;/p&gt;

&lt;p&gt;Won't you come along for the ride? 🏎️💨&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8HJwRJik--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2thwbfvhieyl5lkm9o7i.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8HJwRJik--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2thwbfvhieyl5lkm9o7i.gif" alt="Cool guy" width="498" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
