Skip to content

Feedback homework week 2 #1

@remarcmij

Description

@remarcmij

Hi Kenan,

Here is my feedback on your homework.

  • When you work on your homework in VSCode it is best to open the root folder that contains the entire Git repo rather than one of its subfolders. So, in this case, open the folder hyf-javascript1 rather than the week2 folder in VSCode. The file .eslintrc.json and the folder .vscode can best reside in the project's root folder, so that they automatically apply to week2 and week3 etc.

  • Overall your code looks fine: well-formatted, no spelling errors, consistent use of let instead of var.

5th assignment

There is another way to find the highest value of two numbers. Google for 'mdn math' and see what you can find.

6th assignment

  • We may have confused you guys with the word 'plurality'. We meant that the variable name (which was yours to choose) was in plural form, as for instance you did with favoriteAnimals, which is the plural form of the singular favoriteAnimal. But you got the idea anyway.
  • It is best to be consistent in the use of upper- and lowercase, and singular and plural form in the names of the animals. If you use an uppercase begin letter as in "Dogs" then I would expect something like "Baby Pigs". If instead you had "dog", then "baby pig" would be fine.

8th assignment

While you can use commas to separate values in a console.log statement, the commas you used in the if statement have an entirely different meaning. See this article: MDN: Comma operator. Of the expressions you used in the if statement only the last one (typeof w === typeof r) will determine the outcome. Obviously, variables q and w are not of the same type (number vs string), but still it prints "SAME TYPE". Now you know why.

You've done well. Congrats!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions