class 10–205

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

Today in class we went into more detail into building classes with constructors and multiple methods. Classes are a great way to build libraries of something using javascript so i think they are a very interesting and useful tool.

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

the new arrow function syntax is just a quicker way to write functions for developers.

  • How does this new syntax differ from the older function signature, function nameFunc(){}, both in style and functionality?

Arrow functions do not have their own this, the value of this remains the same

  • Explain the differences on the usage of foo between function foo() {} and const foo = function() {}

function foo() {} is a function declaration, const foo = function () {} is a function expression.

  • What advantage is there for using the arrow syntax for a method in a constructor?

Because arrow functions dont work well with this, I would not use them in a constructor. Generally i have found myself leaning towards arrow functions because theyre the newer and more efficient and clean way to write a function but this seems to be the one drawback.

  • Can you give an example for destructuring an object or an array?Destructuring helps to unpack data from objects.


const car = {

make: ‘honda’,

model: ‘accord’,

year: ‘2015’


const {make, model} = movie

console.log(make, model); // ‘honda’, ‘accord’

  • 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.

Closure gives you access to an outer functions scope from an inner function.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Integrate a ZIO Kafka Producer in an I/O database environment

How to Use the Vuetify Stepper Component

Capstone Project Development Journal: Week 3

Django + GraphQL + React —1. Integrate GraphQL into your Django project

Getting Started With Redux, Part 1

@ngrx/data Will Change Your Life

How to use MSAL Angular 8 for authenticating Users

Lesson Learned from Creating my Portfolio Site

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ryan Pearson

Ryan Pearson

More from Medium

Host : queen king

CS 373 Spring 2022: Anthony Chhang

The Painted Door approach allows a Product Manager to avoid wasting time building something nobody…

CBD: Towards another point of view