<?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>Forem: Abdulmuizz98</title>
    <description>The latest articles on Forem by Abdulmuizz98 (@oraio).</description>
    <link>https://forem.com/oraio</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%2F770439%2Fdc0408ef-4bbc-4d70-ae1c-76c901206e62.jpg</url>
      <title>Forem: Abdulmuizz98</title>
      <link>https://forem.com/oraio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oraio"/>
    <language>en</language>
    <item>
      <title>JAVASCRIPT 102: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS WITH MODERN JAVASCRIPT
</title>
      <dc:creator>Abdulmuizz98</dc:creator>
      <pubDate>Mon, 21 Feb 2022 23:23:46 +0000</pubDate>
      <link>https://forem.com/oraio/javascript-102-introduction-to-data-structures-and-algorithms-with-modern-javascript-3il1</link>
      <guid>https://forem.com/oraio/javascript-102-introduction-to-data-structures-and-algorithms-with-modern-javascript-3il1</guid>
      <description>&lt;h1&gt;
  
  
  JAVASCRIPT 102: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS WITH MODERN JAVASCRIPT
&lt;/h1&gt;

&lt;p&gt;One thing that can be considered almost a given in most interviews is the test of a candidate's appreciation of data structures and algorithms. A good knowledge of what data structure to use in specific problems is what separates elite developers from the rest.&lt;/p&gt;

&lt;p&gt;Congrats, on taking your first steps to that elite class.&lt;/p&gt;

&lt;h2&gt;
  
  
  ALGORITHMS
&lt;/h2&gt;

&lt;p&gt;Oxford dictionary defines an algorithm as a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer. An algorithm can be seen as a set of structured statements or instructions that dictate the steps to solving a particular problem.&lt;/p&gt;

&lt;p&gt;When faced with a problem, a structured way to go about the algorithm is to use a &lt;strong&gt;flow-chart&lt;/strong&gt; &lt;em&gt;(a diagrammatic representation of the steps involved)&lt;/em&gt; or a &lt;strong&gt;pseudo-code&lt;/strong&gt; &lt;em&gt;(a statement of the steps in a near-native language)&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Some common algorithms you can practice for interviews include:&lt;/p&gt;

&lt;h3&gt;
  
  
  Fizz Buzz
&lt;/h3&gt;

&lt;p&gt;Given a number as an input, print out every integer from 1 to that number. However, when the integer is divisible by 2, print out "Fizz"; when it's divisible by 3, print out "Buzz"; when it's divisible by both 2 and 3, print out "Fizz Buzz".&lt;br&gt;
Reverse String&lt;br&gt;
Required to reverse the order of characters in an input string.&lt;/p&gt;
&lt;h3&gt;
  
  
  Palindrome
&lt;/h3&gt;

&lt;p&gt;A palindrome is a word or phrase that reads the same backward as forward. Write a function that checks for this.&lt;/p&gt;
&lt;h2&gt;
  
  
  DATA STRUCTURES
&lt;/h2&gt;

&lt;p&gt;Now data structures.&lt;/p&gt;

&lt;p&gt;There are a number of data structures that are indispensable to developers when coming up with algorithms or writing solutions to problems. These structures help them attain efficiency without compromising on performance.&lt;/p&gt;

&lt;p&gt;I'd be introducing you to some of the basic ones. Here you go.&lt;/p&gt;
&lt;h3&gt;
  
  
  Array
&lt;/h3&gt;

&lt;p&gt;An array is an ordered data structure with elements separated by a comma while encapsulated within square brackets. For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;List&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;boy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;girl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;woman&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Queues
&lt;/h3&gt;

&lt;p&gt;The queue works conversely to a Stack. The difference is laden in the fact that Queue uses the &lt;strong&gt;FIFO principle&lt;/strong&gt; &lt;em&gt;(First In First Out)&lt;/em&gt;. Take for instance, when you queue for a bus, the first in the queue will always board first. Queue has the following methods; &lt;strong&gt;enqueue, dequeue, front, isEmpty, size&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack
&lt;/h3&gt;

&lt;p&gt;In stacks, the last item to get in the structure is the one that gets pulled first. This is called LIFO just like when you stack CDs on a pile, you can only remove the last stacked CD first.&lt;br&gt;
.Stack has the following methods &lt;strong&gt;push, pop, peek, and length&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Linked list.
&lt;/h3&gt;

&lt;p&gt;A linked list is a data structure that imitates a kind of chain linking structure. The first node in the structure is called the &lt;strong&gt;head&lt;/strong&gt; and it holds a pointer that connects to the next and the cycle continues till the last node is called the &lt;strong&gt;tail&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>JAVASCRIPT 101: INTRODUCTION TO MODERN JAVASCRIPT</title>
      <dc:creator>Abdulmuizz98</dc:creator>
      <pubDate>Sun, 20 Feb 2022 11:33:57 +0000</pubDate>
      <link>https://forem.com/oraio/javascript-101-introduction-to-modern-javascript-1fhk</link>
      <guid>https://forem.com/oraio/javascript-101-introduction-to-modern-javascript-1fhk</guid>
      <description>&lt;h1&gt;
  
  
  JAVASCRIPT 101: INTRODUCTION TO MODERN JAVASCRIPT
&lt;/h1&gt;

&lt;p&gt;Yeah, I get it. You're done with multiple courses and a few static webpage projects on &lt;strong&gt;HTML&lt;/strong&gt; and &lt;strong&gt;CSS&lt;/strong&gt; and are really getting obsessed with this web development world. You're itching to learn &lt;strong&gt;JavaScript&lt;/strong&gt;. Oh! Yeah, almost forgot you, among the few other hand, looking to get the hang of a programming language first; well you've all come to the right place. My subtle &lt;strong&gt;Introduction to Modern JavaScript&lt;/strong&gt;. Your tour to this magical world of sensation.&lt;/p&gt;

&lt;p&gt;JavaScript is no doubt one of the most important programming languages. It is probably the most sorted out because of its flexibility of use cases. From its use in &lt;strong&gt;DOM manipulation&lt;/strong&gt;, &lt;strong&gt;client-side&lt;/strong&gt; handlings to &lt;strong&gt;back-end&lt;/strong&gt; functionalities. Nowadays, you even see some games with JavaScript.&lt;/p&gt;

&lt;p&gt;So, why wait when we can start now.&lt;/p&gt;

&lt;h2&gt;
  
  
  JAVASCRIPT OUTPUT
&lt;/h2&gt;

&lt;p&gt;Results of processes can be retrieved in a number of ways in JavaScript, specifically about 4 ways but each use case has their peculiarity. This article would focus on the most popular; '&lt;code&gt;console.log&lt;/code&gt;' used to log output to the console. This can be assessed very easily without needing to download any &lt;strong&gt;IDE&lt;/strong&gt; (&lt;em&gt;Integrated Development Environment&lt;/em&gt;), as JavaScript can run in the browser itself. You can get access to the console in your browser from the developer tools menu of your browser. If you use chrome, the shortcut '&lt;code&gt;ctrl + shift + I&lt;/code&gt;' will prompt your console. &lt;/p&gt;

&lt;p&gt;You can try out  &lt;code&gt;1 + 2&lt;/code&gt; and hit enter on the console and you'd get &lt;code&gt;3&lt;/code&gt; as a result. &lt;strong&gt;Yeah! That's accessing the console directly&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A more practical way would be  accessing it through a script from within a webpage, in which case you'd need the '&lt;code&gt;console.log&lt;/code&gt;' statement.&lt;/p&gt;

&lt;h2&gt;
  
  
  JAVASCRIPT VARIABLES
&lt;/h2&gt;

&lt;p&gt;Just like in algebra where we assigned a letter, say &lt;code&gt;x&lt;/code&gt; to a value that changes, Javascript also works with variables.&lt;br&gt;
Variables in JavaScript can be &lt;em&gt;initialized&lt;/em&gt; in about &lt;strong&gt;3&lt;/strong&gt; ways using the following keywords;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;var&lt;/li&gt;
&lt;li&gt;let&lt;/li&gt;
&lt;li&gt;const&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  var
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;var&lt;/code&gt; is used for initializing  and assigning values that you want to be reusable anywhere within the code. It is usually &lt;em&gt;hoisted&lt;/em&gt; and can be assigned before even initialized.&lt;/p&gt;
&lt;h3&gt;
  
  
  let
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; functions almost like &lt;code&gt;var&lt;/code&gt;, but has a scope limitation, so it is only operable within the curly brackets it's initialized. &lt;code&gt;let&lt;/code&gt; variables are also hoisted like &lt;code&gt;var&lt;/code&gt;, although they are not allowed to be assigned prequel to initialization.&lt;/p&gt;
&lt;h3&gt;
  
  
  const
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;const&lt;/code&gt; are pretty much similar to constants in algebra, stuff like &lt;code&gt;Pi&lt;/code&gt; that has an unchanging value. const values must be assigned immediately they're initialized like so;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  JAVASCRIPT DATA TYPES
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt; in JavaScript refers to the type of data a particular value is. I.e whether it's a number, string etc.. We have the following &lt;strong&gt;primitive types&lt;/strong&gt;;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bool&lt;/strong&gt; - represents a boolean value i.e true or false.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Number&lt;/strong&gt; - represents a number literal e.g 10, 11.098 etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;String&lt;/strong&gt; - represents a string literal i.e a strand of characters between a single or double quote. For example, &lt;em&gt;"I am a boy"&lt;/em&gt;, &lt;em&gt;'She is Joy'&lt;/em&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  JAVASCRIPT OPERATORS
&lt;/h2&gt;

&lt;p&gt;Operators operate on two or more operands (values) to give a result in an operation. Most of the basic arithmetic operators are supported in JavaScript e.g +, -, *. &lt;/p&gt;

&lt;p&gt;Comparison operators like &lt;strong&gt;==&lt;/strong&gt; or &lt;strong&gt;===&lt;/strong&gt; (equals), != or !===(not equals), etc.&lt;br&gt;
You would like to note that &lt;strong&gt;=&lt;/strong&gt; is not the same as equals in JavaScript like in math. In JavaScript it's used as an &lt;strong&gt;assignment operator&lt;/strong&gt;, to give variables a particular value.&lt;/p&gt;

&lt;p&gt;Logical operators like '&amp;amp;&amp;amp;' (and) and '||' (or) are also supported.&lt;/p&gt;

&lt;p&gt;Yeah, that's it for the sneak peek. To get more insight into JavaScript you may want to use the &lt;a href="https://www.w3schools.com/js/default.asp"&gt;W3Schools JavaScript Tutorial&lt;/a&gt;.  &lt;/p&gt;

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