# Day 25: Done with Basic Algorithm Scripting!

## Today’s Progress:

Today I completed the [Basic Algorithm Scripting](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#basic-algorithm-scripting) section of the JavaScript course from freeCodeCamp and started the [Object Oriented Programming](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#object-oriented-programming) section. I’m currently 19% done. You can read my full journey of #100DaysOfCode on [GitHub](https://github.com/ananfito/100-days-of-code).

### *Quotes & Key Ideas:*

*   Similar to real-life objects, *objects* in JavaScript contain properties and values. For example:

```
let dog = {  
  name: "Spot",  
  numLegs = 4  
};
```

*   “Objects can have a special type of property, called a method. Methods are properties that are functions. This adds different behavior to an object.”
*   The `this` keyword is used to refer to the name of the object. For example:

```
let duck = {  
  name: "Aflac",  
  numLegs: 2,  
  sayName: function() {return "The name of this duck is " + this.name + ".";}  
};
```

*   *“Constructors* are functions that create new objects. They define properties and behaviors that will belong to the new object. Think of them as a blueprint for the creation of new objects.”

“Constructors follow a few conventions:

*   Constructors are defined with a capitalized name to distinguish them from other functions that are not `constructors`.
*   Constructors use the keyword `this` to set properties of the object they will create. Inside the constructor, `this` refers to the new object it will create.
*   Constructors define properties and behaviors instead of returning a value as other functions might.”

## **Thoughts:** 

I’m very delighted that I completed the last challenge in the Basic Algorithm Scripting section. Those challenges were difficult, but worth it. It felt good to put into practice what I’ve been learning so far.

I’ve only just begun the Object Oriented Programming section, but so far it’s going well. I’m especially enjoying seeing how things like *constructors*, and the `this` keyword is put into use. Previously, while reading *Eloquent JavaScript* I struggled to understand these concepts. I won't say I fully understand them now, but I'm getting there.

In addition to programming, I also took some time to connect with others via Discord. This is a part of my programming journey that I think I’ve neglected and would like to dedicate more time to. Overall, I’m satisfied with today’s study session. As with yesterday’s session, I stuck with the [Mozart’s Piano Concerto №23](https://youtu.be/BMYjGkgzinU) on repeat to stay focus.

### *References:*

I found the following tutorials/guides useful in today’s session:

*   [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Array/splice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice)
*   [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Array/slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)

## **Link to work:** 

For my progress visit the timeline on my [freeCodeCamp Profile](https://www.freecodecamp.org/ananfito).

*You can read my full #100DaysOfCode journal on [GitHub](https://github.com/ananfito/100-days-of-code)*
