<?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: - -</title>
    <description>The latest articles on DEV Community by - - (@haridulai).</description>
    <link>https://dev.to/haridulai</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%2F849945%2F6ff6052f-f491-4ab3-acad-7567db3bdc38.jpeg</url>
      <title>DEV Community: - -</title>
      <link>https://dev.to/haridulai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haridulai"/>
    <language>en</language>
    <item>
      <title>TOP - JavaScript Course</title>
      <dc:creator>- -</dc:creator>
      <pubDate>Wed, 08 Nov 2023 20:42:41 +0000</pubDate>
      <link>https://dev.to/haridulai/top-javascript-course-4pio</link>
      <guid>https://dev.to/haridulai/top-javascript-course-4pio</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;del&gt;How This Course Will Work&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;A Quick Review&lt;/del&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Organizing Your Javascript Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;del&gt;Organizing Your Javascript Code Introduction&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;Objects and Object Constructors&lt;/li&gt;
&lt;li&gt;Project: Library&lt;/li&gt;
&lt;li&gt;Factory Functions and the Module Pattern&lt;/li&gt;
&lt;li&gt;Project: Tic Tac Toe&lt;/li&gt;
&lt;li&gt;Classes&lt;/li&gt;
&lt;li&gt;ES6 Modules&lt;/li&gt;
&lt;li&gt;Webpack&lt;/li&gt;
&lt;li&gt;Project: Restaurant Page&lt;/li&gt;
&lt;li&gt;OOP Principles&lt;/li&gt;
&lt;li&gt;Project: Todo List&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  JavaScript in the Real World
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Linting&lt;/li&gt;
&lt;li&gt;Dynamic User Interface Interactions&lt;/li&gt;
&lt;li&gt;Form Validation with JavaScript&lt;/li&gt;
&lt;li&gt;What is ES6?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Asynchronous JavaScript and APIs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;JSON&lt;/li&gt;
&lt;li&gt;Asynchronous Code&lt;/li&gt;
&lt;li&gt;Working with APIs&lt;/li&gt;
&lt;li&gt;Async and Await&lt;/li&gt;
&lt;li&gt;Project: Weather App&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Bit of Computer Science
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Very Brief Intro to CS&lt;/li&gt;
&lt;li&gt;Recursive Methods&lt;/li&gt;
&lt;li&gt;Project: Recursion&lt;/li&gt;
&lt;li&gt;Time Complexity&lt;/li&gt;
&lt;li&gt;Space Complexity&lt;/li&gt;
&lt;li&gt;Common Data Structures and Algorithms&lt;/li&gt;
&lt;li&gt;Project: Linked Lists&lt;/li&gt;
&lt;li&gt;Project: Binary Search Trees&lt;/li&gt;
&lt;li&gt;Project: Knights Travails&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Intermediate Git
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Deeper Look at Git&lt;/li&gt;
&lt;li&gt;Working with Remotes&lt;/li&gt;
&lt;li&gt;Using Git in the Real World&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing JavaScript
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Testing Basics&lt;/li&gt;
&lt;li&gt;Project: Testing Practice&lt;/li&gt;
&lt;li&gt;More Testing&lt;/li&gt;
&lt;li&gt;Project: Battleship&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Finishing Up with JavaScript
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hdtop</category>
    </item>
    <item>
      <title>TOP - Objects and Object Constructors</title>
      <dc:creator>- -</dc:creator>
      <pubDate>Wed, 08 Nov 2023 20:20:51 +0000</pubDate>
      <link>https://dev.to/haridulai/top-objects-and-object-constructors-1p0</link>
      <guid>https://dev.to/haridulai/top-objects-and-object-constructors-1p0</guid>
      <description>&lt;p&gt;&lt;a href="https://www.theodinproject.com/lessons/node-path-javascript-objects-and-object-constructors" rel="noopener noreferrer"&gt;TOP&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;There are multiple ways to &lt;strong&gt;define objects&lt;/strong&gt; but in most cases, it is best to use the &lt;strong&gt;object literal&lt;/strong&gt; syntax as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObject = {
  property: 'Value!',
  otherProperty: 77,
  "obnoxious property": function() {
    // do stuff!
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are also &lt;strong&gt;2 ways to get information&lt;/strong&gt; out of an &lt;strong&gt;object&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;dot&lt;/strong&gt; notation &lt;code&gt;myObject.property; // 'Value!'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;square &lt;strong&gt;bracket&lt;/strong&gt; notation &lt;code&gt;myObject["obnoxious property"]; // [Function]&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Which method you use will depend on context. Dot notation is cleaner and is usually preferred&lt;/p&gt;

&lt;p&gt;you cannot use variables in dot notation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const variable = 'property';

myObject.variable; // this gives us 'undefined' because it's looking for a property named 'variable' in our object

myObject[variable]; // this is equivalent to myObject['property'] and
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lesson overview
&lt;/h2&gt;

&lt;p&gt;This section contains a general overview of topics that you will learn in this lesson.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to write an object constructor and instantiate the object.&lt;/li&gt;
&lt;li&gt;Describe what a prototype is and how it can be used.&lt;/li&gt;
&lt;li&gt;Explain prototypal inheritance.&lt;/li&gt;
&lt;li&gt;Understand the basic do’s and don’t’s of prototypal inheritance.&lt;/li&gt;
&lt;li&gt;Explain what &lt;code&gt;Object.create&lt;/code&gt; does.&lt;/li&gt;
&lt;li&gt;Explain what the &lt;code&gt;this&lt;/code&gt; keyword is.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Object constructors
&lt;/h2&gt;

&lt;p&gt;When you have a specific type of object that you need to duplicate like our player or inventory items, &lt;strong&gt;a better way to create them is using an object constructor&lt;/strong&gt;, which is a &lt;strong&gt;function&lt;/strong&gt; that looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Player(name, marker) {
  this.name = name;
  this.marker = marker;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and which you &lt;strong&gt;use by calling the function&lt;/strong&gt; with the keyword &lt;code&gt;new.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const player = new Player('steve', 'X');
console.log(player.name); // 'steve'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just like with objects created using the Object Literal method, you can &lt;strong&gt;add functions to the object&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 Player(name, marker) {
  this.name = name;
  this.marker = marker;
  this.sayName = function() {
    console.log(name)
  };
}

const player1 = new Player('steve', 'X');
const player2 = new Player('also steve', 'O');
player1.sayName(); // logs 'steve'
player2.sayName(); // logs 'also steve'

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Exercise
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Write a constructor for making “Book” objects&lt;/li&gt;
&lt;li&gt;Your book objects should have the book's &lt;strong&gt;title&lt;/strong&gt;, &lt;strong&gt;author&lt;/strong&gt; and number of &lt;strong&gt;pages&lt;/strong&gt;, and whether or not you have &lt;strong&gt;read&lt;/strong&gt; the book&lt;/li&gt;
&lt;li&gt;Put a function into the constructor that can report the book info like so:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;theHobbit.info(); // "The Hobbit by J.R.R. Tolkien, 295 pages, not read yet"

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

&lt;/div&gt;



&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/hdcodesdev/embed/rNPyqve?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  The prototype
&lt;/h2&gt;

</description>
      <category>javascript</category>
      <category>top</category>
      <category>hdtop</category>
    </item>
  </channel>
</rss>
