<?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: Suhaima Noor</title>
    <description>The latest articles on DEV Community by Suhaima Noor (@suhaima_noor_93beec2f68d8).</description>
    <link>https://dev.to/suhaima_noor_93beec2f68d8</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4220316%2Fa66d7615-227a-424a-9a77-52b657c140eb.png</url>
      <title>DEV Community: Suhaima Noor</title>
      <link>https://dev.to/suhaima_noor_93beec2f68d8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/suhaima_noor_93beec2f68d8"/>
    <language>en</language>
    <item>
      <title>Building a Wildlife Tracker with JavaScript Objects 🐅</title>
      <dc:creator>Suhaima Noor</dc:creator>
      <pubDate>Tue, 17 Nov 2026 22:05:55 +0000</pubDate>
      <link>https://dev.to/suhaima_noor_93beec2f68d8/building-a-wildlife-tracker-with-javascript-objects-5e13</link>
      <guid>https://dev.to/suhaima_noor_93beec2f68d8/building-a-wildlife-tracker-with-javascript-objects-5e13</guid>
      <description>&lt;p&gt;Learning to code is a continuous journey, and I believe one of the best ways to strengthen programming concepts is to put them into practice.&lt;/p&gt;

&lt;p&gt;Today, I built a small JavaScript project called Wildlife Tracker as part of my ongoing learning journey.&lt;/p&gt;

&lt;p&gt;The goal was to practise working with JavaScript objects and understand how their properties can be accessed, added, updated, and deleted.&lt;/p&gt;

&lt;p&gt;Let's explore what I practised!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creating JavaScript Objects&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I started by creating two objects representing different animals: a tiger and an elephant.&lt;/p&gt;

&lt;p&gt;Each object contains three properties:&lt;/p&gt;

&lt;p&gt;species: Represents the animal's name.&lt;/p&gt;

&lt;p&gt;age: Stores the animal's age.&lt;/p&gt;

&lt;p&gt;isEndangered: Indicates whether the animal is endangered.&lt;/p&gt;

&lt;p&gt;const tiger = {&lt;br&gt;
  species: "Tiger",&lt;br&gt;
  age: 5,&lt;br&gt;
  isEndangered: true&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;const elephant = {&lt;br&gt;
  species: "Elephant",&lt;br&gt;
  age: 10,&lt;br&gt;
  isEndangered: true&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;This helped me practise organizing related information using objects.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accessing Object Properties&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I created functions to retrieve an animal's species and age using dot notation.&lt;/p&gt;

&lt;p&gt;const getSpecies = (animal) =&amp;gt; {&lt;br&gt;
  return animal.species;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;const getAge = (animal) =&amp;gt; {&lt;br&gt;
  return animal.age;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;console.log(getSpecies(tiger));&lt;br&gt;
console.log(getAge(tiger));&lt;/p&gt;

&lt;p&gt;Dot notation provides a straightforward way to access a specific property of an object.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Adding New Properties&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, I practised adding a new property to an existing object.&lt;/p&gt;

&lt;p&gt;For this, I created an addHabitat() function.&lt;/p&gt;

&lt;p&gt;const addHabitat = (animal, habitat) =&amp;gt; {&lt;br&gt;
  animal.habitat = habitat;&lt;br&gt;
  return animal;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;console.log(addHabitat(tiger, "Rainforest"));&lt;/p&gt;

&lt;p&gt;This adds a new habitat property to the tiger object.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Updating Existing Properties&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Objects also allow us to modify existing property values.&lt;/p&gt;

&lt;p&gt;I created an updateAge() function to update an animal's age.&lt;/p&gt;

&lt;p&gt;const updateAge = (animal, newAge) =&amp;gt; {&lt;br&gt;
  animal.age = newAge;&lt;br&gt;
  return animal;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;console.log(updateAge(elephant, 12));&lt;/p&gt;

&lt;p&gt;Here, the elephant's age changes from 10 to 12.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Deleting Object Properties&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I also explored the JavaScript delete operator.&lt;/p&gt;

&lt;p&gt;It allows us to remove a property from an object.&lt;/p&gt;

&lt;p&gt;const removeEndangeredStatus = (animal) =&amp;gt; {&lt;br&gt;
  delete animal.isEndangered;&lt;br&gt;
  return animal;&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;console.log(removeEndangeredStatus(tiger));&lt;/p&gt;

&lt;p&gt;This removes the isEndangered property from the tiger object.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Checking Whether a Property Exists&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How can we check whether an object contains a particular property?&lt;/p&gt;

&lt;p&gt;I used the hasOwnProperty() method for this.&lt;/p&gt;

&lt;p&gt;const hasHabitat = (animal) =&amp;gt; {&lt;br&gt;
  return animal.hasOwnProperty("habitat");&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;console.log(hasHabitat(tiger));    // true&lt;br&gt;
console.log(hasHabitat(elephant)); // false&lt;/p&gt;

&lt;p&gt;The method returns true if the object has the specified own property; otherwise, it returns false.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Accessing Properties Using Bracket Notation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, I practised accessing object properties dynamically using bracket notation.&lt;/p&gt;

&lt;p&gt;function getProperty(animal, propertyName) {&lt;br&gt;
  return animal[propertyName];&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;console.log(getProperty(tiger, "species"));&lt;br&gt;
console.log(getProperty(elephant, "age"));&lt;/p&gt;

&lt;p&gt;Unlike dot notation, bracket notation allows us to use a variable to determine which property we want to access.&lt;/p&gt;

&lt;p&gt;This is particularly useful when the property name is not known until runtime.&lt;/p&gt;

&lt;p&gt;What I Learned&lt;/p&gt;

&lt;p&gt;Through this small project, I practised several fundamental JavaScript object operations:&lt;/p&gt;

&lt;p&gt;Creating objects.&lt;/p&gt;

&lt;p&gt;Accessing properties using dot notation.&lt;/p&gt;

&lt;p&gt;Accessing properties using bracket notation.&lt;/p&gt;

&lt;p&gt;Adding new properties.&lt;/p&gt;

&lt;p&gt;Updating existing properties.&lt;/p&gt;

&lt;p&gt;Deleting properties.&lt;/p&gt;

&lt;p&gt;Checking whether a property exists.&lt;/p&gt;

&lt;p&gt;Although this was a small project, it gave me an opportunity to apply these concepts in code rather than just reading about them.&lt;/p&gt;

&lt;p&gt;My takeaway: Understanding a concept is important, but applying it through practice helps build a stronger foundation.&lt;/p&gt;

&lt;p&gt;I'm continuing to learn, experiment, and build. There's always something new to explore! 🚀&lt;/p&gt;

&lt;h1&gt;
  
  
  BuildInPublic #JavaScript #WebDevelopment #LearningToCode #Beginners
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F940bbpqvw0almjc9lchr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F940bbpqvw0almjc9lchr.png" alt=" " width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

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