-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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-javascript1rather than theweek2folder in VSCode. The file.eslintrc.jsonand the folder.vscodecan best reside in the project's root folder, so that they automatically apply toweek2andweek3etc. -
Overall your code looks fine: well-formatted, no spelling errors, consistent use of
letinstead ofvar.
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 singularfavoriteAnimal. 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!