hyf-javascript1's Issues
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
-
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 -
Excellent.
More JavaScript
-
Correct. I was wondering what made you choose letters
q
,w
ande
, although any letters will do here. Even this:function sumCalculator(ك, ل, م) { return ك + ل + م; }
-
Excellent name for the parameter: it reflects what it represents.
-
Correct. But since this function can print out any object a more generic name, such as
printObject
would be preferred. Its parameter name could beobj
. -
Great that you are handling unsupported vehicle codes.
-
Correct.
-
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.
-
Correct. But
bus
is an awkward choice as its plural form isbuses
and notbuss
. I'm not sure iftrack
is a vehicle type. Did you meantractor
? -
Correct.
-
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. -
I'm missing the word
and
from your advertisement. -
See 10.
-
Correct.
-
Correct.
-
Correct.
-
An explanation as a comment of what is happening here would have been nice.
-
Same as 15.
-
Correct.
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
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.