hyf-homework's People
hyf-homework's Issues
nicely done
2 ways of finding shortest word is better than 1 :)
Movies js
code is not there for movies functionalities.
indentation makes code unreadable
I can't read this code because it's not clear what goes with what. Make sure you do your indentation so that people can read it, install the prettier
extension to VSCode.
The logic looks wrong at first glance. Does the code give you the result you want?
confusing naming
This function should be called doubleNumbers, because it just multiplies by 2. doubleOddNumbers is confusing
indentation and function naming.
Indentation makes the code very hard to read, even for yourself later. Make it nice by hand, or use the 'prettier' extension to VSCode, which will format it for you.
name your variables so that it's clear what they contain
The logic of the function is correct, but variable naming is confusing:
Are you keeping JUST long titles or movies with long titles? Is it a list of strings (titles) or objects (movies WITH titles)?
function naming
sortNumber
is not a good name for this function which just subtracts b-a
, subtract
would actually be more correct
Homework Feedback JS1- Week3
Good work ๐ . Waiting to see your favSong task. Let me know if any queries.
Here is my feedback for your task .
Item array removal Task -
Task was removing random name using random method.โจHere, you are choosing the position and removing it.โจFor removing random name from the array either you use for loop inside If statement or you can just check the index of the element which is matching then slice it.
Series Task -
console.log(('In total that is '), totalTimeSpentInSeries, ('% of my life'));
Is not working because round3num is string. And when u added something to string it will concat.
So, donโt do โtoFixedโ before adding . It will fix the issue.
Enjoy codingย ๐
Homework Feedback JS1-Week2
Hi John
Here's my feedback for your homework.
Full Name
Works great and as expected. One part of the exercise was to check if the names are not empty, you could try to adapt your code to check that a string is not empty. As a hint, there's two way to accomplish this, either with firstname !== ""
or firstname.length > 0
.
Winter Wear
Good job with the . my only comment would be that the last conditional could just ask if the temp is above 26 degrees, (temperature > 26)
. That captures all temperatures above. Of course if you want to limit to realistic values, your solution makes sense.
Candy
I think it would be best if you discussed this exercise in class. Here are some tips if you want to try again. boughtCandyPrices should start off as an empty array: const boughtCandyPrices = []
. Next, your addCandy function should check for the name of the candy (if ..., like you did) and push the number to the array. Another mistake you made is boughtCandyPrices.push(weight * "chocolate")
. Here you are trying to multiply a number with a string. Try replacing the string with the actual prices from the Candy Price Table in the exercise.
I hope that helps a little,
Best,
Olivier
indentation missing
Same story everywhere. Fix it. Please.
toLowerCase() should be on both sides
You should either say 'Surfer'.toLowerCase() or 'surfer', when you compare to movie.title.toLowerCase(), otherwise it'll never be equal.
Also you should either have a else return false
or just return the entire expression like this:
const movies1 = movies.filter(movie =>
movie.title.toLowerCase() === "surfer" || movie.title.toLowerCase() === "alien" || movie.title.toLowerCase() === "benjamin");
heavy math inside array index
As described in class, it is recommended you take the math outside the array index operator []
what happens if your condition is not satisfied?
const oddNumbers = numbers.filter ((number) => {
if (number % 2 !== 0) return true
})
You need to either say
else return false
at the end, or simplify the function as
number => number % 2 !== 0
Homework Feedback JS1 -Week4
Great work ๐ฅ . Your code looks very well structured. Everything works good . But I have few things to comment :
For add/remove task
You are saying only if the user wants to add fishing/singing then add or else you can are not allowed to add anything. To allow user to add anything .
(lowerString.includes("fishing to")) instead write this
lowerString.startsWith("add") && lowerString.endsWith("to my todo") same for remove
lowerString.startsWith("remove") && lowerString.endsWith("from my todo")
Enjoy coding ๐
Doubling odd no.
Works perfect! :) but HW is Rewrite that program using map and filter don't forget to use arrow functions.
plz complete it!
Reduce looks correct
Yes good job on this one.
Homework Feedback - HTML/CSS - Week 2
Hi John,
I am glad to see your coding skills evolve this fast! You did it ๐. Your website looks pretty much similar to the one of the exercise. Congratulations for the hard work here ๐!!!! In order to it perform better and also get 100% the look of the requirement, I guess some adjustments would be nice, for example:
- The use of semantic tags instead of
divs
would make your html and css a lot more simple and easy to understand. For example, you are using<div id="first">
to a container that is related to the header / title of your site, you could use<header></header>
instead ๐ - Give your classes a meaningful name, so you know what that is about and it is easier to maintain your code, for example I would definitely change
<section class="section1">
for something that really means that portion of the code, like<section class="development-section">
. - Classes are super helpful, but is always a good practice to sit down and analyse if you need a class there, in case you need, understand if the part o the code behaves in some home like other other part of code, so you could have one single class used among the items that looks the same. For example, your headlines behaves the same, has the same size, color, style.... so instead of having
<h2 class="ontheweb">LOGOTYPES ON THE WEB</h2>
or<h2 class="title">THE GALLERY</h2>
or even<h1 id="industry"> WEB DEVELOPMENT AS AN INDUSTRY
you could have standardized all your headlines to beh1
for example, and then have in your css onlyh1
{something here}, you could have achieved the same results with less code and more semantically ๐ธ - Remember that indentation is super important, is trivial to understand the scope of the elements to understand how to style them
- I see that you used a <script> inside your html in order to get the google maps, that is a nice try! ๐ However ( dont worry you will learn) that scripts are place in the very end of your document. If you wanted to know how to put a interactive map in your footer, maybe this site can give you a hint ๐ช
- The mobile version ๐ฑ of your site, is loosing a little the style of the desktop, the main idea was just to play around with the elements , but keep the style. So I encourage you to remove some borders that you have forgotten inside your media query, for example ๐
Keep the pace of doing your best as you are doing! Well done! ๐
Homework Feedback - HTML/CSS - week 3
Hi John,
great homework!
Try to think for more suitable names for ids and classes.
It is nice that you added a pattern validation.
Please look at the comments and updates.
Keep up the good work!
Homework Feedback - JS1 - week 1
Hi ,
Great jobย ๐ฅย . Everything looks fine for me. I can see you used "let" that's good.
I have only one comment for you.
Task - House price estimator
Task was to compare housePricePeter with 2500000 and housePriceJulia with 1000000.
Not between Peter and Julia. Please fix the logic.
Rest all looks cool to me ๐
You should return the value
Typically for functions like median and average, you want to return the result of the computation. You're just console.logging.
indentation
Please use cleaner indentation. But the function is correct and does the right thing, good job
indentation
Watch your indentation, the code is hard to read.
Also, ClkOnce is not a good name for a function -> it should be named after what it is doing?
Good job!
I like your creative way of writing code. It was a nice idea to add a menu to your CV and it is great that you use real info for your site.
Adding different lists to your HTML was a nice practice of the material you've got so far.
You have a good understanding of structuring code.
The only thing is that maybe instead of dividing your HTML into lists, you can try to add sections.
Well done!!!
JS3Week2 HW
Well done, good written code, nicely put comments and also gives expected o/p.
Exc . translateOneByOne is not done I guess, plz confirm.
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.