<?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: Ayotomide</title>
    <description>The latest articles on DEV Community by Ayotomide (@ayotomi_de).</description>
    <link>https://dev.to/ayotomi_de</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%2F1947728%2F2b36d5d3-648a-4547-a98c-c6e4f99c0380.jpg</url>
      <title>DEV Community: Ayotomide</title>
      <link>https://dev.to/ayotomi_de</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayotomi_de"/>
    <language>en</language>
    <item>
      <title>Day 5 of #100daysofMiva Coding Challenge: Values and Variables in JS</title>
      <dc:creator>Ayotomide</dc:creator>
      <pubDate>Fri, 30 Aug 2024 12:53:09 +0000</pubDate>
      <link>https://dev.to/ayotomi_de/day-5-of-100daysofmiva-challenge-values-and-variables-in-js-4ce0</link>
      <guid>https://dev.to/ayotomi_de/day-5-of-100daysofmiva-challenge-values-and-variables-in-js-4ce0</guid>
      <description>&lt;p&gt;Hi guys. I've been so busy lately I haven't even had the time to document how my journey has been🤧. Regardless, I'll continue so stay tuned❤️. &lt;/p&gt;

&lt;p&gt;For my day 5 documentation, I just did something very simple and short. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrqx51m66s53npnyipnm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrqx51m66s53npnyipnm.png" alt="Assignment" width="800" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So as you can see from the above, it's a very simple task to do once you understand values and variables. &lt;/p&gt;

&lt;p&gt;So what are values and variables?&lt;/p&gt;

&lt;h2&gt;
  
  
  Values in JavaScript
&lt;/h2&gt;

&lt;p&gt;Think of values as the actual data or information you work with in JavaScript. These are like the ingredients in a recipe. Some examples of values are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Numbers: Like 10, 3.14, or -5&lt;/li&gt;
&lt;li&gt;Text (called strings): Like "Hello", "JavaScript is fun!", or "123"&lt;/li&gt;
&lt;li&gt;Boolean: Which are just true or false&lt;/li&gt;
&lt;li&gt;Others: There are also other types of values, like null (which means "nothing") or undefined (which means "not yet defined").&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Variables in Javascript
&lt;/h2&gt;

&lt;p&gt;Now, imagine you have a box with a label on it. You can put one of these values into that box and label it with a name. This labeled box is called a variable.&lt;/p&gt;

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

&lt;p&gt;You might have a variable called age, and inside that box, you store the number 13.&lt;br&gt;
You could have another variable called greeting, and in that box, you store the text "Hello, World!".&lt;/p&gt;

&lt;p&gt;Here’s what it looks like in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let age = 13;  // Here, 'age' is the variable, and '13' is the value stored in it.
let greeting = "Hello, World!";  // 'greeting' is the variable, and the text is the value.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why Use Variables?
&lt;/h2&gt;

&lt;p&gt;Variables are helpful because they let you store data and then use or change it later. Instead of writing "Hello, World!" over and over, you can just write greeting wherever you need that message. If you need to change the message, you only need to update it in one place.&lt;br&gt;
So, when you code in JavaScript, you're creating variables to store values, which you can then use to build your program!&lt;/p&gt;

&lt;p&gt;Now that we're done with what values and variables are, let's unveil my assignment.&lt;/p&gt;

&lt;p&gt;I started by first linking my second JS file which I'll be using called "assignment.js". &lt;br&gt;
NB: We can link more than one JS file to a HTML file&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvk1qtx7mz5kz3fypb47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgvk1qtx7mz5kz3fypb47.png" alt="HTML file" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Secondly, I went to my browser to open my console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvsxynn7xu4u7n9m8kex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvsxynn7xu4u7n9m8kex.png" alt="Console 1" width="800" height="418"&gt;&lt;/a&gt;&lt;br&gt;
NB: To open your console, right click on your mouse, click on inspect and navigate to console&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4naxlsnop3nxhvvbh581.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4naxlsnop3nxhvvbh581.png" alt="Console 2" width="800" height="379"&gt;&lt;/a&gt;&lt;br&gt;
As we can see from the above console, only the output of my 1st JS file is showing. &lt;/p&gt;

&lt;p&gt;I then went ahead to input my variables and values which will later run on the console as will be seen below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndy5jtbtfu08zi5pmrzx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndy5jtbtfu08zi5pmrzx.png" alt="Assingment" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwc6mpg90vhpfi2tc8k8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwc6mpg90vhpfi2tc8k8t.png" alt="Console ouput" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that’s a wrap for Day 5!🎉 I told you it was simple—just like enjoying a slice of cake 🍰 (minus the calories, of course). Thanks for sticking around and being awesome! More fun (and of course, a few more lines of code) are coming your way, so don’t forget to stay tuned. Until next time, happy coding! ✨&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>100daysofmiva</category>
    </item>
    <item>
      <title>Day 3&amp;4 of the #100daysofMiva Coding Challenge: Linking JavaScript to HTML</title>
      <dc:creator>Ayotomide</dc:creator>
      <pubDate>Sat, 24 Aug 2024 17:14:07 +0000</pubDate>
      <link>https://dev.to/ayotomi_de/day-34-of-the-100daysofmiva-coding-challenge-4k6o</link>
      <guid>https://dev.to/ayotomi_de/day-34-of-the-100daysofmiva-coding-challenge-4k6o</guid>
      <description>&lt;p&gt;Hi guys. Sorry for posting this late. I had some issues while writing and publishing this article but it's all resolved now. Anyways, let's forget that and focus on the article of the day - Linking Javascript to an HTML document,&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Brief overview of HTML and JavaScript&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;HTML (Hypertext Markup Language)&lt;/strong&gt; is the language used to structure content on the web. It organizes elements like text, images, and links into a cohesive layout, forming the foundation of any webpage. However, HTML is static—it displays content but doesn’t add interactivity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript&lt;/strong&gt; is a dynamic programming language that allows you to add interactivity and behavior to your webpage. With JavaScript, you can create animations, validate forms, handle events, and update content without reloading the page, making your website more engaging and responsive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importance of Linking JavaScript to HTML
&lt;/h3&gt;

&lt;p&gt;Linking JavaScript to HTML is essential because it enables you to combine the structure provided by HTML with the dynamic features of JavaScript:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enhances User Experience:&lt;/strong&gt; JavaScript allows your webpage to respond to user actions, creating a more interactive and engaging experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adds Dynamic Functionality:&lt;/strong&gt; You can use JavaScript to create features like dynamic forms, interactive maps, and real-time updates, turning a static webpage into a powerful web application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keeps Code Organized:&lt;/strong&gt; By linking an external JavaScript file, you separate content (HTML) from behavior (JavaScript), making your code cleaner and easier to manage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improves Performance:&lt;/strong&gt; External JavaScript files can be cached by the browser, reducing load times on subsequent visits and improving overall site performance.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  II. Basic Methods of Linking JavaScript
&lt;/h2&gt;

&lt;p&gt;When working with JavaScript, there are three main ways to incorporate it into your HTML: Inline, Internal, and External JavaScript. Here’s a quick overview of each method, with a primary focus on External JavaScript.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Inline JavaScript
&lt;/h3&gt;

&lt;p&gt;Inline JavaScript is written directly within an HTML element’s tag using the &lt;code&gt;onclick&lt;/code&gt;, &lt;code&gt;onmouseover&lt;/code&gt;, or other event attributes. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`&amp;lt;button onclick="alert('Hello, World!')"&amp;gt;Click Me&amp;lt;/button&amp;gt;`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While convenient for small tasks, inline JavaScript is generally discouraged because it mixes HTML and JavaScript, leading to code that is harder to read and maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Internal JavaScript
&lt;/h3&gt;

&lt;p&gt;Internal JavaScript is placed within a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag inside the HTML document’s &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; section. Here’s an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="UTF-8"&amp;gt;
&amp;lt;title&amp;gt;Internal JavaScript Example&amp;lt;/title&amp;gt;
&amp;lt;script&amp;gt;
function showMessage() {
alert('Hello, World!');
}
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;button onclick="showMessage()"&amp;gt;Click Me&amp;lt;/button&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internal JavaScript is useful for small projects or single-page applications but can quickly become cluttered as your codebase grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  III. External JavaScript: The Preferred Method
&lt;/h2&gt;

&lt;p&gt;External JavaScript is the most recommended method for linking JavaScript to HTML. It involves writing your JavaScript code in a separate &lt;code&gt;.js&lt;/code&gt; file and linking it to your HTML document using the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create an External JavaScript File:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// script.js
function showMessage() {
alert('Hello, World!');
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Link the JavaScript File to Your HTML:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta charset="UTF-8"&amp;gt;
&amp;lt;title&amp;gt;External JavaScript Example&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;button onclick="showMessage()"&amp;gt;Click Me&amp;lt;/button&amp;gt;
&amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While Inline and Internal JavaScript are suitable for simple or small-scale projects, External JavaScript is the preferred method for most web development. It promotes cleaner code, better organization, and improved performance, making it a best practice for linking JavaScript to HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  IV. Best Practices for Linking JavaScript
&lt;/h2&gt;

&lt;p&gt;When linking JavaScript to HTML, it's important to follow best practices to optimize performance and ensure your code runs efficiently. Here’s a look at some key practices, including using the &lt;code&gt;defer&lt;/code&gt; and &lt;code&gt;async&lt;/code&gt; attributes and other performance considerations.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Using the &lt;code&gt;defer&lt;/code&gt; Attribute
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;defer&lt;/code&gt; attribute ensures that your JavaScript file is loaded in the order it appears but only executed after the HTML document has fully loaded. This is particularly useful when your script depends on the HTML structure being fully rendered.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="script.js" defer&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Using the &lt;code&gt;async&lt;/code&gt; Attribute
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;async&lt;/code&gt; attribute allows the browser to download the JavaScript file asynchronously while continuing to parse the HTML document. Once the script is downloaded, it’s executed immediately, which may occur before or after the HTML has been fully loaded.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="script.js" async&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Considerations for Performance Optimization
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Place Scripts at the Bottom:&lt;/strong&gt; If you’re not using &lt;code&gt;defer&lt;/code&gt; or &lt;code&gt;async&lt;/code&gt;, place your &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags just before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag. This ensures the HTML is fully loaded before the JavaScript executes, preventing any delays in rendering.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
&amp;lt;!-- Content here --&amp;gt;
&amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minify JavaScript Files:&lt;/strong&gt; Minifying your JavaScript files reduces their size by removing unnecessary whitespace, comments, and other non-essential elements. This results in faster downloads and improved performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a Content Delivery Network (CDN):&lt;/strong&gt; Hosting your JavaScript files on a CDN can reduce latency and improve load times by delivering the files from a server closer to the user.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  V. Troubleshooting Common Issues
&lt;/h2&gt;

&lt;p&gt;inking JavaScript to HTML is usually straightforward, but a few common issues can arise. Here’s how to troubleshoot and resolve them effectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Incorrect File Paths
&lt;/h3&gt;

&lt;p&gt;One of the most common problems is using an incorrect file path in the &lt;code&gt;src&lt;/code&gt; attribute of the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag. If the path is wrong, the browser won’t be able to locate the JavaScript file, and your code won’t run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Double-check the path to your JavaScript file. Ensure that the path is relative to the HTML file's location.&lt;/li&gt;
&lt;li&gt;For example, if your &lt;code&gt;script.js&lt;/code&gt; file is in the same directory as your HTML file, use:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it’s in a subfolder called &lt;code&gt;js&lt;/code&gt;, the correct path would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="js/script.js"&amp;gt;&amp;lt;/script&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Script Loading Order
&lt;/h3&gt;

&lt;p&gt;JavaScript files can sometimes execute before the HTML content is fully loaded, causing errors if your script tries to manipulate elements that haven’t been rendered yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use the &lt;code&gt;defer&lt;/code&gt; attribute:&lt;/strong&gt; This ensures your script runs only after the entire HTML document has been parsed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="script.js" defer&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Place the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag just before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag:&lt;/strong&gt; This ensures that the HTML content loads before the script runs.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;!-- Content here --&amp;gt;
    &amp;lt;script src="script.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Browser Console for Debugging
&lt;/h3&gt;

&lt;p&gt;When something goes wrong, the browser’s console is your best friend. It shows errors, warnings, and messages that can help you diagnose and fix issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the browser’s developer tools (usually by pressing &lt;code&gt;F12&lt;/code&gt; or &lt;code&gt;Ctrl+Shift+I&lt;/code&gt;) and navigate to the "Console" tab.&lt;/li&gt;
&lt;li&gt;Look for error messages, which typically include a description of the problem and the line number where it occurred.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;console.log()&lt;/code&gt; in your JavaScript code to print values and track your script’s behavior for debugging purposes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("Script loaded successfully.");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  VI. Advanced Techniques
&lt;/h2&gt;

&lt;p&gt;Once you’re comfortable with the basics of linking JavaScript to HTML, you can explore more advanced techniques that enhance your web development projects. Here are two key areas to dive into:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Dynamic Script Loading
&lt;/h3&gt;

&lt;p&gt;Dynamic script loading allows you to load JavaScript files on the fly, based on certain conditions or events. This technique is useful for optimizing page load times by loading scripts only when they’re needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function loadScript(url) {
const script = document.createElement('script');
script.src = url;
document.head.appendChild(script);
}

// Load an additional script when needed
loadScript('additionalScript.js');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loading large libraries or plugins only when specific features are activated.&lt;/li&gt;
&lt;li&gt;Loading different scripts based on user actions or device type.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Module System (ES6 Modules)
&lt;/h3&gt;

&lt;p&gt;With the introduction of ES6 modules, JavaScript now supports the modularization of code natively. ES6 modules allow you to split your code into reusable, maintainable files and import only what you need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Exporting Functions or Variables:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// math.js
export function add(a, b) {
return a + b;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Importing Functions or Variables:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// main.js
import { add } from './math.js';

console.log(add(2, 3)); // Outputs: 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code Organization:&lt;/strong&gt; Break down large codebases into smaller, focused modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reusability:&lt;/strong&gt; Easily reuse code across different parts of your project or across projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid Global Namespace Pollution:&lt;/strong&gt; Modules automatically create a local scope, preventing naming conflicts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; To use ES6 modules, add the &lt;code&gt;type="module"&lt;/code&gt; attribute to the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="main.js" type="module"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  VIII. Conclusion
&lt;/h2&gt;

&lt;p&gt;Linking JavaScript to HTML is a foundational skill in web development, opening the door to creating dynamic, interactive, and fully functional websites. Starting with the basics, you learned how to integrate JavaScript using inline, internal, and external methods, with a strong focus on the external approach for better code organization and performance.&lt;/p&gt;

&lt;p&gt;We explored essential best practices like using the &lt;code&gt;defer&lt;/code&gt; and &lt;code&gt;async&lt;/code&gt; attributes to optimize script loading, along with troubleshooting tips to help you navigate common issues. Delving into advanced techniques, such as dynamic script loading and ES6 modules, gave you the tools to write more modular, efficient, and maintainable code.&lt;/p&gt;

&lt;p&gt;Remember, JavaScript is the key to transforming your static HTML pages into interactive experiences. As you continue to experiment and grow your skills, you’ll discover just how powerful and versatile JavaScript can be. Keep coding, keep exploring, and most importantly, keep having fun while building amazing things on the web!&lt;/p&gt;

&lt;p&gt;Anticipate my next post👋🏾❤️&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>100daysofmiva</category>
    </item>
    <item>
      <title>Day 2 of #100daysofMiva Coding Challenge</title>
      <dc:creator>Ayotomide</dc:creator>
      <pubDate>Thu, 22 Aug 2024 08:58:10 +0000</pubDate>
      <link>https://dev.to/ayotomi_de/day-2-of-100daysofmiva-coding-challenge-dne</link>
      <guid>https://dev.to/ayotomi_de/day-2-of-100daysofmiva-coding-challenge-dne</guid>
      <description>&lt;p&gt;Hi guys. So for day 2 of this challenge, I decided to leave GitHub and focus on what I really wanted to learn: Javascript.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Javascript
&lt;/h2&gt;

&lt;p&gt;Imagine you’re a wizard in the world of web development. You’ve got your trusty HTML to build the structure of your website, like the bones of a magical creature. Then, you have CSS to give it some style—like choosing the perfect robe or outfit. But something’s missing. Your creation is still, lifeless. That’s where JavaScript (JS) comes in—it’s the magic wand that brings your creation to life! JavaScript is a programming language primarily used to create interactive and dynamic content on websites. It enables developers to implement features like animations, form validations, and real-time updates without needing to reload the page. JavaScript can be used on both the front end (what users see and interact with) and the back end (server-side operations) of web applications.&lt;/p&gt;

&lt;p&gt;JavaScript is everywhere. It’s the language that makes the web what it is today—interactive, fun, and endlessly engaging. Whether you’re looking to create a cool website, an addictive mobile app, or even a game, learning JavaScript is like learning the most powerful spell in the book.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvnf0cwa0x12fuy791xaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvnf0cwa0x12fuy791xaw.png" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Uses of Javascript
&lt;/h2&gt;

&lt;p&gt;JavaScript (JS) is a versatile programming language widely used in web development. Here are some key uses of JavaScript:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Web Development (Frontend)&lt;/strong&gt;&lt;br&gt;
Interactive Web Pages: JavaScript makes websites interactive. From dropdown menus to image sliders, it powers the dynamic elements you see on a website.&lt;br&gt;
Form Validation: It checks if the user has filled out a form correctly before submitting it.&lt;br&gt;
Animations: JavaScript can create animations and effects, such as fading elements or moving objects on the screen.&lt;br&gt;
&lt;strong&gt;2. Web Development (Backend)&lt;/strong&gt;&lt;br&gt;
Server-Side Programming: With Node.js, JavaScript can run on the server to handle requests, manage databases, and serve content.&lt;br&gt;
Real-time Applications: JavaScript is used for real-time applications like chat apps, online gaming, and live data streaming.&lt;br&gt;
&lt;strong&gt;3. Mobile App Development&lt;/strong&gt;&lt;br&gt;
Cross-Platform Mobile Apps: Frameworks like React Native and Ionic use JavaScript to build mobile apps that work on both iOS and Android.&lt;br&gt;
&lt;strong&gt;4. Game Development&lt;/strong&gt;&lt;br&gt;
Browser Games: JavaScript, along with HTML5 and Canvas, is used to create interactive games that run directly in the browser.&lt;br&gt;
&lt;strong&gt;5. Automation and Scripting&lt;/strong&gt;&lt;br&gt;
Task Automation: JavaScript can automate repetitive tasks in web development, such as minifying files or testing code.&lt;br&gt;
Browser Extensions: JavaScript powers many browser extensions that enhance the functionality of browsers like Chrome and Firefox.&lt;br&gt;
&lt;strong&gt;6. Data Visualization&lt;/strong&gt;&lt;br&gt;
Charts and Graphs: Libraries like D3.js and Chart.js allow developers to create complex data visualizations and interactive charts.&lt;br&gt;
&lt;strong&gt;7. Artificial Intelligence and Machine Learning&lt;/strong&gt;&lt;br&gt;
AI and ML Models: JavaScript, with libraries like TensorFlow.js, can be used to build and run AI models directly in the browser.&lt;br&gt;
&lt;strong&gt;8. Internet of Things (IoT)&lt;/strong&gt;&lt;br&gt;
IoT Devices: JavaScript can be used to program IoT devices, enabling communication between devices and the web.&lt;br&gt;
&lt;strong&gt;9. Progressive Web Apps (PWAs)&lt;/strong&gt;&lt;br&gt;
PWAs: JavaScript enables the development of web apps that work offline and feel like native mobile apps.&lt;br&gt;
&lt;strong&gt;10. API Integration&lt;/strong&gt;&lt;br&gt;
Fetching Data: JavaScript is used to interact with APIs, fetching data from servers and displaying it on web pages dynamically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvovpe000qtij05zifwb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvovpe000qtij05zifwb3.png" alt="Image description" width="766" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90rivj3dyornmjkigqky.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90rivj3dyornmjkigqky.png" alt="Image description" width="691" height="293"&gt;&lt;/a&gt;&lt;br&gt;
These are just a few of the many uses of JavaScript, which continues to be a key language in the tech industry due to its flexibility and wide range of applications.&lt;/p&gt;
&lt;h2&gt;
  
  
  What I did today on Javascript
&lt;/h2&gt;

&lt;p&gt;So basically, I didn't go head on and start codes I didn't understand😂. I took it step by step. I first learnt how to code on the chrome development tool and I'll like to show you how I did that.&lt;/p&gt;

&lt;p&gt;HOW TO OPEN THE CHROME DEVELOPMENT TOOLS&lt;br&gt;
There are 3 ways to open the chrome development tools:&lt;br&gt;
-Command+Alt+J on Mac&lt;br&gt;
 Control + Alt+ J on Windows&lt;br&gt;
-Right clicking the mouse and then choosing inspect will also open the devlopment tool on Chrome. Although it will bring up the element tab and we can then go to console which is where we are going to carry out some codes.&lt;br&gt;
-The last step is to go to the chrome menu and then go to view, click on developer. Under the developer click on Javascript console and the console tab will pop up.&lt;br&gt;
The one that worked for me is the second one where I just right clicked on my mouse and clicked on inspect and then navigated to console tab.&lt;br&gt;
NB: I used the guest browser and not my normal browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft3b4ntp8co74b369kq6r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft3b4ntp8co74b369kq6r.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F48vtw4qfqjdb9hwrllm8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F48vtw4qfqjdb9hwrllm8.png" alt="Image description" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can increase the font by clicking on command plus and then vice versa by clicking on command - in mac but in chrome it’s control + and control -.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjxjpctwu4eyefwjxo3n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffjxjpctwu4eyefwjxo3n.png" alt="Image description" width="800" height="417"&gt;&lt;/a&gt; An image where I clicked on control +&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n7t3f75o54dwf4q1kmc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n7t3f75o54dwf4q1kmc.png" alt="Image description" width="800" height="417"&gt;&lt;/a&gt; An image where I clicked on control -&lt;/p&gt;

&lt;p&gt;The console allows us to write and test Javascript code so it’s very useful during development e.g fixing errors however we can’t write real applications using this console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ewldn32bndcj5q7mnds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ewldn32bndcj5q7mnds.png" alt="Image description" width="800" height="419"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert("Hello World")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyk4zhifpk2kiaxqe5r96.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyk4zhifpk2kiaxqe5r96.png" alt="Image description" width="800" height="416"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let js = "amazing"
if (js === 'amazing') alert("Javascript is fun")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tg8nanuwrqpv1awdzrt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tg8nanuwrqpv1awdzrt.png" alt="Image description" width="800" height="410"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;50+60-10

39+54-24
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So from the above images we can see a pop-up and even some mathematical calculations carried out using JS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges I faced
&lt;/h2&gt;

&lt;p&gt;The only challenge I can say I faced was not knowing why the codes where working that way and with time I believe I'll understand and be very good at it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I'm very happy that I took this journey and that I'm already learning a lot. I personally know that I'll soon overcome the challenges I faced and before you know it I'll be a guru🤭. Anyways thanks a lot fam❤️. Anticipate my day 3 article👋🏾.&lt;/p&gt;

</description>
      <category>100daysofmiva</category>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Day 1: #100daysofMiva Coding Challenge. Understanding Git and GitHub</title>
      <dc:creator>Ayotomide</dc:creator>
      <pubDate>Tue, 20 Aug 2024 20:20:46 +0000</pubDate>
      <link>https://dev.to/ayotomi_de/day-1-100daysofmiva-coding-challenge-understanding-git-and-github-33h7</link>
      <guid>https://dev.to/ayotomi_de/day-1-100daysofmiva-coding-challenge-understanding-git-and-github-33h7</guid>
      <description>&lt;p&gt;Hey everyone, it's me again! Today marks Day 1 of the #100DaysOfMiva challenge. Get comfortable because we’re about to dive into how the day went. I’m sure you’ll pick up a thing or two along the way 😉. Remember yesterday when I almost broke down over the challenges I was facing with GitHub? Well, I’m thrilled to say that’s no longer the case 🤭🎉. Turns out, I found exactly what I needed on w3schools.com—pretty ironic since I was there learning HTML and didn’t even realize I could learn Git too! 😂😭. Now, let's have a summary of my learning today.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnhe096aopnqsfw76tyrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnhe096aopnqsfw76tyrf.png" alt="How learning about Git looks like on the W3schools website" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Git and GitHub: A Developer's Best Friends
&lt;/h2&gt;

&lt;p&gt;In the world of software development, two names often come up together: Git and GitHub. If you’ve ever found yourself scratching your head, wondering what all the buzz is about, don’t worry—you’re not alone. In this post, we’re going to unravel the mystery behind Git and GitHub, who created them, and why they’ve become essential to every developer’s toolkit. So, grab a cup of coffee (or tea)🍵, get cozy, and let’s dive into the magic of these game-changing technologies!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Git?
&lt;/h2&gt;

&lt;p&gt;Git is like a supercharged time machine for your code. Imagine working on a project, and suddenly, something breaks. You wish you could go back in time to when everything worked perfectly. With Git, you can! It’s a version control system that tracks every change you make to your code, letting you rewind to any point in your project's history.&lt;/p&gt;

&lt;p&gt;But Git isn’t just about time travel; it’s also about teamwork. Whether you’re coding solo or with a group of developers, Git ensures everyone’s work stays organized and conflict-free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Developed Git?
&lt;/h2&gt;

&lt;p&gt;Git was created by Linus Torvalds in 2005. If that name rings a bell, it’s because he’s also the genius behind the Linux operating system. Linus developed Git out of necessity. At the time, the Linux kernel (a huge, collaborative project) needed a version control system that was fast, reliable, and capable of handling a large number of contributors. When existing solutions didn’t cut it, Linus took matters into his own hands—and Git was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is GitHub?
&lt;/h2&gt;

&lt;p&gt;Now, let’s talk about GitHub. If Git is your time machine, GitHub is the cloud where you store your time machine’s data. GitHub is an online platform that hosts Git repositories, making them accessible from anywhere. Think of it as a social network for developers, where you can share code, collaborate on projects, and even contribute to open-source initiatives.&lt;/p&gt;

&lt;p&gt;But GitHub isn’t just about storing code. It’s packed with features that make collaboration easy and effective. You can track issues, review code, and discuss changes—all within the platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Developed GitHub?
&lt;/h2&gt;

&lt;p&gt;GitHub was founded in 2008 by Tom Preston-Werner, Chris Wanstrath, PJ Hyett, and Scott Chacon. The goal was simple: to make Git accessible and easy to use for developers worldwide. And they succeeded. Today, GitHub is a hub for millions of developers, from hobbyists to professionals, all building the software that powers our world.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use Git and GitHub: A Quick Guide
&lt;/h2&gt;

&lt;p&gt;Getting started with Git and GitHub might seem intimidating, but it’s simpler than you think. Here’s a quick overview:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Git&lt;/strong&gt;: Before you can start using Git, you’ll need to install it on your computer. You can download it from git-scm.com.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgpcfjqwkznktosfe4yi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgpcfjqwkznktosfe4yi.png" alt="How the git-scm.com website looks like" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Up Your Local Project&lt;/strong&gt;: Once Git is installed, navigate to your project folder in the terminal and initialize a Git repository with git init. This command starts tracking changes in your project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make and Save Changes&lt;/strong&gt;: As you work on your project, Git will track every change. When you reach a milestone or want to save your work, you "commit" those changes with git commit -m "Description of what you did". Each commit is like a snapshot of your project at that moment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m Day 1 of my coding challenge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs34yxoo1tivsun49ygqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs34yxoo1tivsun49ygqz.png" alt="Some commands in git" width="800" height="459"&gt;&lt;/a&gt;&lt;br&gt;
Some of the commands available in git and GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push to GitHub&lt;/strong&gt;: After committing your changes, you can push them to GitHub with git push. But first, you need to connect your local repository to a GitHub repository. This is where all your commits will be stored online.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collaborate and Share&lt;/strong&gt;: On GitHub, you can collaborate with other developers, contribute to open-source projects, or even fork someone else’s repository to create your own version of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Git and GitHub Matter
&lt;/h2&gt;

&lt;p&gt;Git and GitHub are more than just tools—they’re a way of thinking about software development. They encourage experimentation, collaboration, and sharing, which are all key to building better software. Whether you’re working on a solo project or contributing to a global open-source initiative, Git and GitHub provide the foundation you need to succeed. &lt;/p&gt;

&lt;p&gt;So, the next time you see a developer talking about “pushing to GitHub” or “making a pull request,” you’ll know they’re using some of the most powerful tools in the tech world, created by some of the brightest minds in the industry.&lt;/p&gt;

&lt;p&gt;Amazing isn't it? I hope you've learned a lot today and I also hope I've inspired you to learn more about this these two developer tools. Anticipate more from this journey on my day 2 article. See you soon👋🏾.&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>100daysofmiva</category>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>Day 0 of the #100daysofMiva Challenge.</title>
      <dc:creator>Ayotomide</dc:creator>
      <pubDate>Mon, 19 Aug 2024 19:49:43 +0000</pubDate>
      <link>https://dev.to/ayotomi_de/day-0-of-the-100daysofmiva-challenge-3klb</link>
      <guid>https://dev.to/ayotomi_de/day-0-of-the-100daysofmiva-challenge-3klb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The journey of a thousand miles begins with a single step - Chinese proverb&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I dive into the thrilling adventure of #100DaysOfMiva, I’m excited to share my experiences and progress with you. In this post, I’ll guide you through the process of setting up my learning and project environment, laying a solid foundation for the challenges that lie ahead🎉.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up my GitHub repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr31l5yt1pw50xiaguq6s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr31l5yt1pw50xiaguq6s.png" alt="Image description" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So basically, the first thing I did was to create a GitHub repository which I created directly on GitHub. The repository will serve as a place where I can store, share and track my projects. It will also allow for collaborations.&lt;/p&gt;

&lt;p&gt;However, I am pretty much new to GitHub and its environment and believe me when I say I practically got lost! It was frustrating at first to be really honest but with the help of friends and colleagues I was able to navigate through... just a little🤧🫠. Honestly, I'm still confused and I have lots of questions on Github and how to use it but with time, I believe I'll scale through😮‍💨. &lt;/p&gt;

&lt;h2&gt;
  
  
  Learning activities that I did today
&lt;/h2&gt;

&lt;p&gt;So technically after all the GitHub stress, I decided to take a break and head on to HTML which I decided to learn on the W3schools website.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqcgqhl4yfv1rvua1k96.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqcgqhl4yfv1rvua1k96.png" alt="Image description" width="800" height="425"&gt;&lt;/a&gt;&lt;br&gt;
Learning HTML on the website was smooth and easy to understand. I look forward to learning more about HTML and many other programming languages in the next 100 days...&lt;/p&gt;

&lt;p&gt;Stay tuned for my daily posts and reports on the 100dayofMiva challenge. Goodbye for now😄.&lt;/p&gt;

&lt;p&gt;PS: If you have any idea of how I can easily navigate GitHub and it's environment be it a video or website or even a youtube tutorial, I'll really appreciate it.&lt;/p&gt;

</description>
      <category>100daysofmiva</category>
      <category>100daysofcode</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
