Skip to content

Feedback homework week 2 #1

@remarcmij

Description

@remarcmij

Hi Hamza, here is my feedback on your homework.

  • Please create a week2 folder inside the hyf-javascript1 folder as requested and move your homework to that folder.

exercise 1

  • Pay attention to punctuation in your text strings: there should be a single space between words.
  • The correct English spelling is 'world'. In my VSCode the spelling checker has flagged the word 'worold' that you used.

exercise 2

  • The solution for the error with the single quote in I'm is not by just replacing it with a single space. The resulting phrase I m is incorrect English. Can you find a way to print I'm without producing the error?

exercise 3

  • There should not be a space between x and ;. If you applied the settings as we discussed in class then VSCode would correct this as you type. Can you please check the VSCode Tips and verify the settings for "editor.formatOnType" and ""editor.formatOnPaste"?

exercise 5

  • It is a standard practice to format if statements such that you start a new line after an opening brace and indent the block of code inside the braces, like this:
if (z > a) {
  console.log(z);
}
else {
  console.log(a);
}
  • There is another way to find the highest of two numbers. Google for 'mdn math' and see what you can find.

exercise 6

  • There is a spelling error in aaray
  • Be consistent in your use of upper- and lowercase. If you spell 'cat' etc. in all lowercase then do the same with 'dog'.

exercise 7

  • Find a way to add the missing single quote in it's length.

exercise 8

  • There is a striking resemblance of your solution with that of Elmira. Did you compare notes?
  • Mind the formatting of the if statements. See my earlier comment.

exercise 9

  • There are redundant spaces in this line % is the reminder result of dividing tow numbers. And a spelling error: tow

Finally, remove all the redundant blank lines at the end of your file. There should only be one blank line.

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