GithubHelp home page GithubHelp logo

hyf-javascript3's People

Contributors

hackoor83 avatar

Watchers

 avatar

hyf-javascript3's Issues

EMRE (Homework Feedback)

Hi Sam(Hisham).
Your code looks clear and neat. I run your code on my VS. It works. But i get some error from eslint. There are something which you defined but you never used.Two of them are value of your functions. I am not sure but this may create a problem when you call the function. Another thing about some of your functions.
For example:

  addStar(star) {
    this.stars.push(star);
}

You did not use return in this function. Is this something ok? Can we use "this" as a return. Because "this" also returns inside an array which is inside the constructor. And You do not get any error even you call your function.(myMovie.addStar(firstActor);).

 addWriter(writer) {
    this.**stars**.push(new StaffMember('Alfonso Cuarón', 'writer', '28-11-1961'));
}

getWriters() {
    this.**stars**.writer;
}

This is the last thing which I don`t understand. Why did you use stars. As I know that we need to send the value inside the writer array which just defined in the constructor.

Thanks.

Feedback homework JS3 Week 1

Hi Sam, here is my feedback on your homework.

  1. Your addWriters() method take a parameter writer but you are not using it. Instead you have 'hard-coded' a StaffMember in the body of the method. If I call your method with another writer as its parameter, your method will just push another Alfsonse Cuarón. For addStar() you are doing it correctly, why the difference?
  2. Similar thing for addMovie() in StaffMember.
  3. The getAge() method of StaffMember is supposed to return an age (in years), not a birth date.
  4. You correctly created a StaffMember object for the mainDirector but you do not use the myMovie1 movie you created with this director. Instead, you continue to use an earlier movie (myMovie) where the director is still just a string.
  5. It would be nice if you would have added some code to add a couple of ratings and tested whether your getAverageRating() method returned the right result.
  6. You added an index.html file in which you load your .js file, but you are not creating any HTML.
  7. Your .eslintrc.json file should be in the root folder of your repo, not in week1 or week2. And you should alway open the root folder of your repo in VSCode, not any subfolder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.