Some weeks are better than others…

This week will be a good one!

Mary Wenzel
2 min readNov 16, 2020

Describe one thing you’re learning in class today. Why do you think it will be important in your future web development journey?

Today we talked about OOP, or Object-Oriented Programming.

Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.

I really enjoy using OOP because it has been easier to grasp than other JavaScript programming aspects and I’m not staring at my code for ages trying to figure out what to do. I feel like any kind of new method I can learn that makes things easier on me as a Web Developer will help me move forward on my path to getting a career in the field

Can you offer a use case for the new arrow => function syntax?

One way to call a function in JavaScript would look something like this,

const Arrow = function () {console.log(arrow)}

This works well but we can make it flow better to the eye by adding the arrow functions.

const Arrow = () => {console.log(arrow)}

Can you give an example for destructuring an object or an array?

First, let's create an Object called sailorScout (after sailor moon because why not)

let sailorScout = {

name: “Sailor Jupiter”,

power: “Lightning”,

real-name: “Makoto Kino” }

we can then deconstruct this by assigning a variable to only pull out Sailor Jupiter and her power Lightning.

const {name, power} = sailorScout

Explain Closure in your own words. How do you think you can use it? Don’t forget to read more blogs and videos about this subject.

A closure is a way to get access to an outer function from an inner, closures are created every time a function is created. So you can grab data from the scope above them and from within themselves.

--

--