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.
Hi Hamza, here is my feedback on your homework.
week2folder inside thehyf-javascript1folder as requested and move your homework to that folder.exercise 1
exercise 2
I'mis not by just replacing it with a single space. The resulting phraseI mis incorrect English. Can you find a way to printI'mwithout producing the error?exercise 3
xand;. 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
ifstatements such that you start a new line after an opening brace and indent the block of code inside the braces, like this:exercise 6
aaray'cat'etc. in all lowercase then do the same with'dog'.exercise 7
it's length.exercise 8
ifstatements. See my earlier comment.exercise 9
% is the reminder result of dividing tow numbers. And a spelling error:towFinally, remove all the redundant blank lines at the end of your file. There should only be one blank line.