<?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: Amanda Suzzanne</title>
    <description>The latest articles on DEV Community by Amanda Suzzanne (@amandasuzzanne).</description>
    <link>https://dev.to/amandasuzzanne</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%2F815048%2F6d3bb506-36b9-4839-b061-785c7a31f1f1.jpeg</url>
      <title>DEV Community: Amanda Suzzanne</title>
      <link>https://dev.to/amandasuzzanne</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amandasuzzanne"/>
    <language>en</language>
    <item>
      <title>Step-by-Step Guide to Importing Google Fonts into CSS</title>
      <dc:creator>Amanda Suzzanne</dc:creator>
      <pubDate>Tue, 03 Sep 2024 10:23:28 +0000</pubDate>
      <link>https://dev.to/amandasuzzanne/step-by-step-guide-to-importing-google-fonts-into-css-1gac</link>
      <guid>https://dev.to/amandasuzzanne/step-by-step-guide-to-importing-google-fonts-into-css-1gac</guid>
      <description>&lt;p&gt;Customizing the typography of your website can greatly enhance its visual appeal and readability. Google Fonts offers a wide selection of high-quality, web-safe fonts that you can easily integrate into your project. &lt;/p&gt;

&lt;p&gt;This guide will walk you through the process of adding a Google Font to your CSS stylesheet, so you can effortlessly apply a unique font to your web pages.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for the Font: Go to the Google Fonts website and search for the font you want to use. Select the font from the search results.&lt;/li&gt;
&lt;/ul&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%2F9if4modrflznmyfv3grq.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%2F9if4modrflznmyfv3grq.png" alt="Image description" width="710" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get the Font: Click the “Get font” button at the top right corner of the page.&lt;/li&gt;
&lt;/ul&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%2Fy8ikdzn3xusru166zwr5.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%2Fy8ikdzn3xusru166zwr5.png" alt="Image description" width="800" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get Embed Code: Click on the “Get embed code” button, located at the top right of the page.&lt;/li&gt;
&lt;/ul&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%2Fcfgvmdhywym6bkdn5yx5.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%2Fcfgvmdhywym6bkdn5yx5.png" alt="Image description" width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import the Font: Click on the “Import” tab in the embed code options.&lt;/li&gt;
&lt;/ul&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%2Fyty7goqh488nw5htr8ue.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%2Fyty7goqh488nw5htr8ue.png" alt="Image description" width="800" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the Font Link: Copy the highlighted line of code provided in the Import tab.&lt;/li&gt;
&lt;/ul&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%2F4woejhpu3jtdxxakuljr.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%2F4woejhpu3jtdxxakuljr.png" alt="Image description" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste in Your CSS File: Open your project in VS Code and locate your CSS file (e.g., index.css). Paste the copied code at the very top of this file.&lt;/li&gt;
&lt;/ul&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%2Fgdl3z9xp66i7gnvtecvh.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%2Fgdl3z9xp66i7gnvtecvh.png" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apply the Font: Set the font-family in your CSS to use the imported font. For example:&lt;/li&gt;
&lt;/ul&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%2Fszolxif7o72oog5l2fuj.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%2Fszolxif7o72oog5l2fuj.png" alt="Image description" width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following these simple steps will apply your selected font to your project, improving its typography.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>"Pink Vibes: A Step-by-Step Guide to Transforming Your VS Code Theme"</title>
      <dc:creator>Amanda Suzzanne</dc:creator>
      <pubDate>Tue, 30 Jan 2024 15:51:51 +0000</pubDate>
      <link>https://dev.to/amandasuzzanne/pink-vibes-a-step-by-step-guide-to-transforming-your-vs-code-theme-27je</link>
      <guid>https://dev.to/amandasuzzanne/pink-vibes-a-step-by-step-guide-to-transforming-your-vs-code-theme-27je</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Welcome to a world of vibrant coding! In this guide, we'll walk you through the simple steps to give your Visual Studio Code a stunning pink makeover. Follow along as we dive into the process of finding and applying a pink theme that will not only make your coding environment visually appealing but also add a touch of personal style.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Launch VS Code and Navigate to Extensions:
&lt;/h2&gt;

&lt;p&gt;Begin by opening your Visual Studio Code app. Once inside, head to the Extensions view. You can find this by clicking on the Extensions icon on the sidebar or using the shortcut &lt;code&gt;Ctrl+Shift+X&lt;/code&gt; (Windows/Linux) or &lt;code&gt;Cmd+Shift+X (Mac)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F48ymn1oul49e44nsotpu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F48ymn1oul49e44nsotpu.png" alt="An image showing the location of the extension icon"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Search for the Perfect Pink Theme:
&lt;/h2&gt;

&lt;p&gt;In the Extensions view, locate the search bar. Type in "pink theme" and hit enter. This will display a variety of pink-themed extensions available for download.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhjrrey29w8isicz60i2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhjrrey29w8isicz60i2.png" alt="An image showing the search bar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Download Your Chosen Pink Theme Extension:
&lt;/h2&gt;

&lt;p&gt;Scroll through the results and find a pink theme that catches your eye. Once you've made your selection, click on the "Install" button to download and install the theme. VS Code will take care of the installation process for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi4n5vp4guqfrxrox6c5h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi4n5vp4guqfrxrox6c5h.png" alt="An image showing the selected theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Activate Your Pink Theme:
&lt;/h2&gt;

&lt;p&gt;With the extension now installed, navigate to the "Color Theme" dropdown menu, usually located in the status bar at the bottom of the window. Find your newly installed pink theme in the list and select it. Voila! Your VS Code environment is now adorned with a delightful pink color scheme. This step is only necessary in the event that your VS Code doesn't automatically activate your pink theme after installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh6xv1mk4excpmedeuup.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuh6xv1mk4excpmedeuup.png" alt="An image showing step 1 of activating the pink theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rnnq9cvkx8xgrwcej1o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rnnq9cvkx8xgrwcej1o.png" alt="An image showing step 2 of activating the pink theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnwuy0qt20lmrcjpj6irc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnwuy0qt20lmrcjpj6irc.png" alt="An image showing step 3 of activating the pink theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Revel in Your Pink Coding Paradise:
&lt;/h2&gt;

&lt;p&gt;Take a moment to appreciate the transformation. Your code editor is now not just a powerful tool but also a reflection of your unique style. Embrace the pink vibes and let the creativity flow!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydpteh974yadku2uu44s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydpteh974yadku2uu44s.png" alt="An image showing the final results"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In just a few simple steps, you've successfully personalized your Visual Studio Code environment with a vibrant pink theme. Coding is not just about functionality; it's also about creating a space that inspires and motivates you. With your new pink theme, get ready to tackle your projects in a visually appealing and personalized coding paradise. Happy coding in style!&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>pink</category>
      <category>themes</category>
    </item>
    <item>
      <title>JavaScript Loops</title>
      <dc:creator>Amanda Suzzanne</dc:creator>
      <pubDate>Thu, 06 Jul 2023 00:03:56 +0000</pubDate>
      <link>https://dev.to/amandasuzzanne/javascript-loops-3i1p</link>
      <guid>https://dev.to/amandasuzzanne/javascript-loops-3i1p</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In programming, loops are constructs that allow you to repeatedly execute a block of code based on a specified condition. They provide a way to automate repetitive tasks and iterate over collections of data. JavaScript has several types of loops:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For loop&lt;/li&gt;
&lt;li&gt;While loop&lt;/li&gt;
&lt;li&gt;Do...while loop&lt;/li&gt;
&lt;li&gt;For...in loop&lt;/li&gt;
&lt;li&gt;For...of loop&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  For Loop
&lt;/h2&gt;

&lt;p&gt;This is the most commonly used loop in JavaScript. It has a compact syntax and consists of three parts: initialization, condition, and increment/decrement. The loop executes the code block as long as the condition is true. &lt;br&gt;
Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (statement 1 ; statement 2 ; statement 3){
    code here...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;Statement 1:&lt;/u&gt; It is the initialization of the counter. It is executed once before the execution of the code block.&lt;br&gt;
&lt;u&gt;Statement 2:&lt;/u&gt; It is the testing statement that defines the condition for executing the code block. It must return a boolean value. It is also an entry-controlled loop as the condition is checked before the execution of the loop statements.&lt;br&gt;
&lt;u&gt;Statement 3:&lt;/u&gt; It is the increment or decrement of the counter &amp;amp; executed (every time) after the code block has been executed.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let x;

// for loop begins when x=2
// and runs till x &amp;lt;=4
for (x = 2; x &amp;lt;= 4; x++) {
    console.log("Value of x:" + x);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Value of x:2
Value of x:3
Value of x:4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  While Loop
&lt;/h2&gt;

&lt;p&gt;The while loop repeatedly executes a block of code as long as the specified condition evaluates to true. It checks the condition before each iteration. It is an entry controlled loop since the test condition is tested before entering the loop body. &lt;br&gt;
Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while (condition) {
    // Statements
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let val = 1;

while (val &amp;lt; 6) {
    console.log(val);

    val += 1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
2
3
4
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Do...while loop
&lt;/h2&gt;

&lt;p&gt;Similar to the while loop, the do-while loop executes a block of code at least once and then repeatedly executes it as long as the specified condition is true. The condition is checked at the end of each iteration.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
    // Statements
}
while(conditions)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let test = 1;
do {
    console.log(test);
    test++;
} while(test&amp;lt;=5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
2
3
4
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main difference between do…while and while loop is that it is guaranteed that do…while loop will run at least once. Whereas, the while loop will not run even once if the given condition is not satisfied.&lt;/p&gt;




&lt;p&gt;Comparison between the &lt;strong&gt;while&lt;/strong&gt; and the &lt;strong&gt;do-while loop:&lt;/strong&gt; The do-while loop executes the content of the loop once before checking the condition of the while loop. While the while loop will check the condition first before executing the content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While Loop&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It is an entry condition looping structure.&lt;/li&gt;
&lt;li&gt;The number of iterations depends on the condition mentioned in the while block.&lt;/li&gt;
&lt;li&gt;The block control condition is available at the starting point of the loop.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Do-While Loop&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It is an exit condition looping structure.&lt;/li&gt;
&lt;li&gt;Irrespective of the condition mentioned in the do-while block, there will a minimum of 1 iteration.&lt;/li&gt;
&lt;li&gt;The block control condition is available at the endpoint of the loop.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  For...in loop
&lt;/h2&gt;

&lt;p&gt;This loop is used to iterate over the properties of an object. It can be a great debugging tool if we want to show the contents of an object. &lt;br&gt;
The for-in loop iterates only over those keys of an object which have their enumerable property set to “true”. The key values in an object have four attributes (value, writable, enumerable, and configurable). &lt;br&gt;
Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let i in obj1) {
    // Prints all the keys in
    // obj1 on the console
    console.log(i);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//declaring a object employee
const courses = {
    firstCourse: 'JavaScript',
    secondCourse: 'React',
    thirdCourse: 'Angular'
};
let value = '';

//using for in loop
for (let item in courses) {
    value += courses[item] + " ";
}
console.log(value);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JavaScript React Angular 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happened in the example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript for-in loop iterates on the object of the course.&lt;/li&gt;
&lt;li&gt;The for every iteration, a key is returned (item)&lt;/li&gt;
&lt;li&gt;The item can now be used to access the value of the object&lt;/li&gt;
&lt;li&gt;The value of the key is given by courses[item]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Important Points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the for-in loop to iterate over non-array objects. Even though we can use a for-in loop for an array, it is generally not recommended. Instead, use a for loop for looping over an array.&lt;/li&gt;
&lt;li&gt;The properties iterated with the for-in loop also include the properties of the objects higher in the Prototype chain.&lt;/li&gt;
&lt;li&gt;The order in which properties are iterated may not match the properties that are defined in the object.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  For...of loop
&lt;/h2&gt;

&lt;p&gt;Introduced in ES6, the for...of loop is used to iterate over iterable objects like arrays, strings, maps, and sets invoking a custom iteration hook with statements to be executed for the value of each distinct property. It provides a simpler syntax compared to the for loop when working with arrays.&lt;br&gt;
Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for ( variable of iterableObjectName) {
   ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Array of numbers
let numArray = [1, 4, 16, 25, 49];

console.log("Elements of numArray are-&amp;gt;");

// for...of Loop
for (let value of numArray) {
    console.log(value);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Elements of numArray are-&amp;gt;
1
4
16
25
49
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Technical Writing 101: Technical Ultimate Guide</title>
      <dc:creator>Amanda Suzzanne</dc:creator>
      <pubDate>Tue, 20 Jun 2023 20:38:01 +0000</pubDate>
      <link>https://dev.to/amandasuzzanne/technical-writing-101-technical-ultimate-guide-171i</link>
      <guid>https://dev.to/amandasuzzanne/technical-writing-101-technical-ultimate-guide-171i</guid>
      <description>&lt;h2&gt;
  
  
  What is technical writing?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Technical writing&lt;/strong&gt; is a kind of writing regarding a particular subject that calls for guidance, instruction, or elaboration. It is a writing discipline that focuses on conveying difficult information to those who require it to complete a particular task or reach a certain objective. As a result, technical writing is frequently referred to as &lt;em&gt;"simplifying the complex"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;It is a form of technical communication that is mostly employed in technical and operational fields and is therefore essential to a variety of enterprises and industries as a result. Without it, it would be difficult or impossible to comprehend or carry out certain operations and complex subjects. &lt;/p&gt;

&lt;h2&gt;
  
  
  Principles of technical writing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audience:&lt;/strong&gt; Know your audience and write for them. Consider their level of technical knowledge, their goals and needs, and their language proficiency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relevance:&lt;/strong&gt; The writing should be relevant to the intended audience. It should address the specific needs of the readers and provide them with the information they need.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarity:&lt;/strong&gt; Use clear and concise language, without any unnecessary words or phrases. Avoid jargon and technical terms that are unfamiliar to your audience. Use short sentences and paragraphs to make your writing easy to understand. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Organization:&lt;/strong&gt; Organize your content in a logical manner, using headings, subheadings, and bullet points to make it easy to follow. Use tables and diagrams to present complex information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy:&lt;/strong&gt; Ensure that your writing is accurate and up-to-date. Verify your facts and use reliable sources. Use precise language and avoid ambiguity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correctness:&lt;/strong&gt; Ensure the writing is accurate and free of errors. It should be factually correct and use proper grammar and punctuation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Completeness:&lt;/strong&gt; Ensure that the writing is complete and covers all necessary information. It should include all relevant details and be thorough in its coverage of a topic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Formatting:&lt;/strong&gt; Use consistent formatting throughout your document. Use a clear and readable font, and ensure that the font size is appropriate. Use headings, subheadings, and other formatting elements to create a hierarchy of information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Style:&lt;/strong&gt; Use an appropriate writing style for your audience and purpose. Use active voice, and avoid passive voice. Use plain language and avoid using overly complex words or phrases, to make it easier for the intended audience to understand. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review and Revision:&lt;/strong&gt; Review and revise your writing for accuracy, clarity, and organization. Have someone else review your work to provide feedback and catch errors that you may have missed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Basic skills required for technical writing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Having a good command of the English language.&lt;/strong&gt; Understanding tenses, acquiring proper punctuation, and mastering paragraph structure are all necessary for this. One way to tell an expert technical writer from an amateur is by the quality of their sentences.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research.&lt;/strong&gt; Writing current content and comprehending reader needs are made easier through research. It helps you compile subject-related data from a range of sources, including academic journals, blogs, competing literature, dissertations, whitepapers, and social networking sites. It is important to sort out useful material and focus your research on a few key areas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audience Survey.&lt;/strong&gt; One of the ways to create content that is users centric and helpful to readers is by asking the following questions before you start writing:
&lt;em&gt;Who are my readers?
What do they need?
What is their knowledge level?
Why will they be reading?
How will they be reading?
Your answer to these questions will help you write quality readers-centric content.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Planning.&lt;/strong&gt; Anything can be executed successfully with the right planning. While creating a content outline, content planning enables you to keep the readers in mind. Knowing what to include and what not to include while creating the content outline is helpful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Editing.&lt;/strong&gt; The elegance of your work comes out in editing as a technical writer, which is why many businesses employ editors. Your writing comes to life in editing. The basics of editing must be learned even though you are just starting out as a technical writer without an editor. It is through editing that grammatical faults and other mistakes are found. Pay close attention to editing; this will set you apart from other technical writers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Examples of Technical Writing
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Product documents - Concepts and features.&lt;/li&gt;
&lt;li&gt;Procedures - How to perform actions.&lt;/li&gt;
&lt;li&gt;API documentation - APIs and parameters with code samples.&lt;/li&gt;
&lt;li&gt;Installation and configuration guides - Steps to install and configure products.&lt;/li&gt;
&lt;li&gt;User guides - Different types of user guides target specific users. For example, user guides for end users and advanced users.&lt;/li&gt;
&lt;li&gt;Admin Guide - Guides meant for Administrators with advanced features and permissions.&lt;/li&gt;
&lt;li&gt;Error Docs - Guides explaining the Error Codes and how to fix them.&lt;/li&gt;
&lt;li&gt;FAQ - Frequently Asked Questions (FAQs) to help users quickly.&lt;/li&gt;
&lt;li&gt;Knowledge Base - KB used by external users and internal Support teams.&lt;/li&gt;
&lt;li&gt;Integration Guides - Steps to integrate third-party products&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>technicalwriting</category>
      <category>writing</category>
    </item>
    <item>
      <title>Introduction to Data Structures and Algorithms with Modern JavaScript</title>
      <dc:creator>Amanda Suzzanne</dc:creator>
      <pubDate>Mon, 21 Feb 2022 16:58:15 +0000</pubDate>
      <link>https://dev.to/amandasuzzanne/introduction-to-data-structures-and-algorithms-with-modern-javascript-457k</link>
      <guid>https://dev.to/amandasuzzanne/introduction-to-data-structures-and-algorithms-with-modern-javascript-457k</guid>
      <description>&lt;p&gt;&lt;strong&gt;Data structures&lt;/strong&gt; are programmatic ways of organizing and storing data so that it can be used efficiently. They consider how the data is stores and their relationship to each other.&lt;br&gt;
&lt;strong&gt;Algorithms&lt;/strong&gt; are sequences of steps that describe how to do something, such as how data is to be accessed from the main memory or secondary storage devices.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Factors to consider when determining the data structures to use:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The efficiency of the program with respect to its run time. Does it perform the optimal number of operations to achieve its goal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The efficiency of a program with respect to its utilization of main memory and secondary storage devices. Does it consume such resources in a fashion that makes its use impractical?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the development costs of a program or system. Could a different approach to the problem significantly reduce the total person-hours invested in it?&lt;br&gt;
&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Examples of Data Structures:
&lt;/h2&gt;
&lt;h2&gt;
  
  
  Arrays
&lt;/h2&gt;

&lt;p&gt;An array is a special variable, which can hold more than one value. It can hold many values under a single name, whereby these values can be accessed by referring to an index number.&lt;/p&gt;

&lt;p&gt;The syntax for creating a JavaScript  Array is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array_name = [item1, item2, ...]; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Spaces and line breaks are not important and the declaration can span multiple lines.&lt;br&gt;
Arrays can be created in the following ways:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const names = ["John", "Joe", "Doe"];

const cars = [];
names[0]= "John";
names[1]= "Joe";
names[2]= "Doe";

const names = new Array("John", "Joe", "Doe");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Elements in an array  can be accessed by referring to the index number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const names = ["John", "Joe", "Doe"];
let name = names[0];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value of an array element can be changed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const names = ["John", "Joe", "Doe"];
names[0] = "Jane";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Queue
&lt;/h2&gt;

&lt;p&gt;A queue is a type of array which uses a FIFO (first in, first out) approach. An example is a line of people going into a store, where the first one in line gets to be served first and the last one is served last. The first element to be inserted in the queue will be the first element to be deleted or removed from the list.&lt;/p&gt;

&lt;p&gt;A queue has the following main operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insert a new element at the end of the queue, which is called enqueue.&lt;/li&gt;
&lt;li&gt;Remove an element from the front of the queue, which is called dequeue.&lt;/li&gt;
&lt;li&gt;Peek an element which gets the element at the front without modifying the queue.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The constructor of the queue is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Queue() {
   this.elements = [];
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The enqueue() method adds an element at the end of the queue. We use the push() method of the array object to insert the new element at the end of the queue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Queue.prototype.enqueue = function (e) {
   this.elements.push(e);
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The dequeue() method removes an element from the front of the queue. In the dequeue() method, we use the shift() method of the array to remove an element at the front of the queue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// remove an element from the front of the queue
Queue.prototype.dequeue = function () {
    return this.elements.shift();
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The peek() method accesses the element at the front of the queue without modifying it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// get the element at the front of the queue
Queue.prototype.peek = function () {
    return !this.isEmpty() ? this.elements[0] : undefined;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;A stack is a type of array which uses a LIFO (last in, last out) approach. An example is a stack of physical files, with the last one placed on the stack being the first one out and the first one to have been placed on the stack being the last one out. The insertion and deletion of elements are done in the same end which is called the top of the stack. &lt;br&gt;&lt;br&gt;
Working with stacks involve the following operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initialize the stack to be empty&lt;/li&gt;
&lt;li&gt;Determine whether the stack is empty or not&lt;/li&gt;
&lt;li&gt;Check whether the stack is full or not&lt;/li&gt;
&lt;li&gt;If the stack is not full, add or insert a new node at the top of the stack. This operation is termed as Push Operation&lt;/li&gt;
&lt;li&gt;If the stack is not empty, then retrieve the node at its top&lt;/li&gt;
&lt;li&gt;If the stack is not empty, the delete the node at its top. This operation is called as Pop operation &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The push() method allows you to add one or more elements to the end of the array. The push() method returns the value of the length property that specifies the number of elements in the array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Let stack = [];
Stack.push(“Banana”, "Orange", "Apple", "Mango”); 
//[Banana, Orange, Apple, Mango]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pop() method removes the element at the end of the array and returns the element to the caller. If the array is empty, the pop() method returns undefined.&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(stack.pop()); //  Banana
console.log(stack); // [Orange, Apple, Mango];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Linked Lists
&lt;/h2&gt;

&lt;p&gt;A linked list is a data structure similar to an array with the main difference being that elements are not stored in a particular memory location or index. In stead, each element is a separate object that contains a pointer or a link to the next object in that list. &lt;br&gt;&lt;br&gt;
Each element/node contains the data stored and a link to the next node. The entry point is called the head and it is a reference to the first node whereas the  last node points to null. If a list is empty, then the head is a null reference. &lt;br&gt;&lt;br&gt;
The size() method returns the number of nodes present in the linked list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;size() {
    let count = 0; 
    let node = this.head;
    while (node) {
        count++;
        node = node.next
    }
    return count;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The clear() method empties out the list&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;clear() {
    this.head = null;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The getLast() method returns the last node of the linked list&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;getLast() {
    let lastNode = this.head;
    if (lastNode) {
        while (lastNode.next) {
            lastNode = lastNode.next
        }
    }
    return lastNode
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The getFirst() method retuens the first node of the linked list&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;getFirst() {
    return this.head;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>JavaScript 101: Ultimate JavaScript Guide</title>
      <dc:creator>Amanda Suzzanne</dc:creator>
      <pubDate>Mon, 14 Feb 2022 14:16:28 +0000</pubDate>
      <link>https://dev.to/amandasuzzanne/javascript-101-ultimate-javascript-guide-3m42</link>
      <guid>https://dev.to/amandasuzzanne/javascript-101-ultimate-javascript-guide-3m42</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to JavaScript
&lt;/h2&gt;

&lt;p&gt;JavaScript is an object-oriented programming and scripting language that is used to provide dynamic and interactive content on webpage. It can work in all modern browsers including Internet explorer, Google Chrome, Firefox and Opera. &lt;/p&gt;

&lt;p&gt;JavaScript statements are separated using semicolons.&lt;/p&gt;

&lt;p&gt;Comments are used to prevent the execution of statements and are ignored by the compiler during execution. the follow the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// For single line comment

/* For block of lines comment
...
...
*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h2&gt;
  
  
  JavaScript data types
&lt;/h2&gt;

&lt;p&gt;Data types specify the kind of data that can be stored and manipulated within a program. there are 6 basic data types in JavaScript:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;String&lt;/strong&gt; - It is used to represent textual data and is created using single or double quotes surrounding one or more characters as shown:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a = 'Hi there!';  
var b = "Hi there!";
var c = "Let's have a cup of coffee."; 
var d = 'He said "Hello" and left.';  
var e = 'We\'ll never give up.';     
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Number&lt;/strong&gt; - It is used to represent positive or negative numbers with or without decimal place, or numbers written using exponential notation:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a = 25;         
var b = 80.5;       
var c = 4.25e+6;    
var d = 4.25e-6;   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Boolean&lt;/strong&gt; - It can hold only two values: true or false. It is typically used to store values like yes (true) or no (false), on (true) or off (false), etc. The Boolean values also come as a result of comparisons in a program.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var isReading = true;   
var isSleeping = false;

var a = 2, b = 5, c = 10;
alert(b &amp;gt; a) // Output: true
alert(b &amp;gt; c) // Output: false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Undefined&lt;/strong&gt; - It can only have the special value &lt;em&gt;undefined&lt;/em&gt;. If a variable has been declared, but has not been assigned a value, it has the value of &lt;em&gt;undefined&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a;
var b = "Hello World!"

alert(a) // Output: undefined
alert(b) // Output: Hello World!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Null&lt;/strong&gt; - It can only have the special value &lt;em&gt;null&lt;/em&gt;. A null value means that there is no value. It is not equivalent to an empty string ("") or 0, it is simply nothing. A variable can be explicitly emptied of its current contents by assigning it the null value.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a = null;
alert(a); // Output: null

var b = "Hello World!"
alert(b); // Output: Hello World!

b = null;
alert(b) // Output: null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h2&gt;
  
  
  JavaScript variables
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;variable&lt;/strong&gt; is used to store information in a computer's memory. Its value can change all throughout a script.&lt;br&gt;
Variables are declared using one of three keywords: &lt;strong&gt;let, const, var&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;let&lt;/strong&gt; is used for declaration of block-level variables. The declared variable is available from the block it is enclosed in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let a;
let name = 'Mandy';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;const&lt;/strong&gt; is used for declaration variables whose values are never intended to change. The variable is available from the block it is declared in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Pi = 3.14;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;var&lt;/strong&gt; is the most commonly used and it does not have the restrictions that the other two keywords have since it was traditionally the only way to declare a variable in JavaScript. A variable declared with the var keyword is available from the function it is declared in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a;
var name = 'Mandy';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some rules to be followed when naming variables are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ensuring that the variable name is descriptive to make it easy to understand what the variable refers to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensuring the variable name is of appropriate length for it to be descriptive enough.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do not use spaces in variable names.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do not use special symbols in variable names, the only exception being the underscore (_).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensuring that the first letter of the variable name is either a letter or an underscore.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Variables are printed by including the variable name in a document.write() command. When printing the value of a variable, the variable name is NOT enclosed in double quotes. 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;var myNumber = 12;
document.write(myNumber);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Variables can also be printed together with regular texts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var myNumber = 12;
document.write("My favorite number is " + myNumber);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;My favorite number is 12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h2&gt;
  
  
  Operators
&lt;/h2&gt;

&lt;p&gt;The numerical operators which can be used are &lt;strong&gt;+, -, *, /&lt;/strong&gt; and &lt;strong&gt;%&lt;/strong&gt; which is the remainder operator(modulo). Values are assigned using &lt;strong&gt;=&lt;/strong&gt;, and there are also compound assignment statements such as &lt;strong&gt;+=&lt;/strong&gt; and &lt;strong&gt;-=&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;x += 5;
x = x + 5;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The + operator also does string concatenation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'Hello' + ' Mandy'; // "Hello Mandy"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a string is added to a number (or other value) everything is converted into a string first, which might be confusing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'3' + 4 + 5;  // "345"
 3 + 4 + '5'; // "75"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Comparisons can be made using &lt;strong&gt;&amp;lt;, &amp;gt;, &amp;lt;=&lt;/strong&gt; and &lt;strong&gt;&amp;gt;=&lt;/strong&gt; and they work for both strings and numbers. The double equals operator performs type coercion given different types. To avoid type coercion, the tripe-equals operator is used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;123 == '123'; // true
1 == true; // true

123 === '123'; // false
1 === true;    // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h2&gt;
  
  
  Control Structures
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For...loop&lt;/strong&gt; - It repeats the block of code specified number of times and has the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for(start point; condition; step) {
//code to execute
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;While...loop&lt;/strong&gt; - It repeats the block of code until condition is true and has the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while(condition) {
//code to execute
step
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Do...while loop&lt;/strong&gt; - It repeats the block of code until a condition is true, but first executes the code and then checks the condition. It has the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do {
//code to execute
step:
} while (condition);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For..in loop&lt;/strong&gt; - It iterates through the properties of an object. the code is executed as many ties as many properties are in the object. It has the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let property in object) {
//code to execute
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For...of loop&lt;/strong&gt; - It iterates through the values of the iterable object and has the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let value of iterable) {
//code to execute
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
