Git Product home page Git Product logo

hyf-javascript1's People

Contributors

heboshka avatar

hyf-javascript1's Issues

Feedback hw of week2 for Javascript2

Hello Hiba. we have 2 repositories; hyf-html-css & Javascript2. in hyf-html-css, there should be week0-week1-week2-week3-week4.
Week4 is missing in your repository.
Thanks

Feedback homework week 3

Hi Hiba, here is my feedback on your JS1 week 3 homework.

Overall this looks pretty good.

Step 4: Strings and Array challenges

  1. Excellent that you used the .replace() method in combination with a regular expression. We won't cover regular expressions in the lectures as it is an advanced, vast topic but at least you got a taste of it her

  2. Excellent.

More JavaScript

  1. Correct. I was wondering what made you choose letters q, w and e, although any letters will do here. Even this:

    function sumCalculator(ك, ل, م) {
      return ك + ل + م;
    }
  2. Excellent name for the parameter: it reflects what it represents.

  3. Correct. But since this function can print out any object a more generic name, such as printObject would be preferred. Its parameter name could be obj.

  4. Great that you are handling unsupported vehicle codes.

  5. Correct.

  6. Excellent that you chose a different name for this function so that it doesn't clashes with name of the function of step 9.

    Again, nice that you are handling invalid vehicle codes. You could extend that to also check age, e.g >= 0.

    If I call your function with an age of 0.5 then it considers the vehicle used.

    Note that you do not have to use parentheses around the condition in a ternary statement. However, it is perfectly fine to include them if this makes it more readable for you.

  7. Correct. But bus is an awkward choice as its plural form is buses and not buss. I'm not sure if track is a vehicle type. Did you mean tractor?

  8. Correct.

  9. Since you are checking the code against the array length it makes sense to also check whether the code is greater of equal to zero.

    You correctly adjust the code for the fact that array indices are zero-based.

    Great use of an ES6 template literal.

    If I call your function with an age of 0.5 then it considers the vehicle used.

  10. I'm missing the word and from your advertisement.

  11. See 10.

  12. Correct.

  13. Correct.

  14. Correct.

  15. An explanation as a comment of what is happening here would have been nice.

  16. Same as 15.

  17. Correct.

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.