Giter Site home page Giter Site logo

hyf-homework's Introduction

Hi My name is Sowmya Mannem

Frontend developer

Coding

I am a Frontend developer who loves React.

  • ๐ŸŒย  I'm based in Copenhagen
  • โœ‰๏ธย  You can contact me at [email protected]
  • ๐Ÿš€ย  I'm currently working on Crwn Clothing App
  • ๐Ÿง ย  I'm learning Typescript,React- Redux, Serverless functions, GraphQL
  • ๐Ÿคย  I'm open to collaborating on Projects
  • โšกย  I am a Mother Taking Fun Rollercoaster Ride Everyday :)

Skills

JavaScriptTypeScriptReactHTML5CSS3Material UINodeJSHerokuMySQLMongoDBFigma

Socials

Badges

Top Languages

Top Repositories








hyf-homework's People

Contributors

sowmya1408 avatar

Watchers

 avatar  avatar

hyf-homework's Issues

JS2 Week 2 Feedback

@sowmya1408 โœŒ๏ธ

Warmup array exercises / Doubling of number

Awesome work here ๐Ÿ‘

const doubleOddNumbers = numbers
.filter(number => number % 2 !== 0)
.map(number => {
const newNumber = number * 2;
return newNumber;
});

A minor way I would improve this would be to change the map to .map(number => number * 2. Assigning and returning newNumber is not needed IMO for simple functions like this.

Warmup array exercises / Working with movies

  • Exercise 1: โœ…
  • Exercise 2: The solution for this could be much simpler by doing movies.filter( ... ). Basically it should be very similar to exercise 2.
    // Create an Array of movie titles with long movie titles
    const movietitles = [];
    const allMovieTitles = movies.forEach(movie => movietitles.push(movie.title));
    const longMovieTitles = movietitles.filter(title => {
    const allTitles = title.split(' ');
    if (allTitles.length >= 2) {
    return title;
    }
    });
    console.log(longMovieTitles);
  • Exercise 3: โœ… Nice work
  • Exercise 4: โœ… Nice work here as well. Improvements: 1) you could return at the end of the function once instead of having 3 returns. 2) you currently actually modify the movie objects from movies when setting movie.tag. Instead you could copy/clone the object first to avoid that.
    // create an extra key called tag
    const extraKeyCalledTag = movies.map(movie => {
    if (movie.rating >= 7) {
    movie.tag = `Good`;
    return movie;
    } else if (movie.rating >= 4) {
    movie.tag = `Average`;
    return movie;
    } else if (movie.rating < 4) {
    movie.tag = `Bad`;
    return movie;
    }
    });
  • Exercise 5: โœ…
  • Exercise 6: โœ… Nice work here. The filter function wants a true/false return value so actually you could simplify the last part of the function to return movieTitlesArray.includes('surfer') || movieTitlesArray.includes('alien') || movieTitlesArray.includes('benjamin').
    const countTotalMoviesForKeywords = movies.filter(movie => {
    const movieTitlesArray = movie.title.toLowerCase().split(' ');
    if (
    movieTitlesArray.includes('surfer') ||
    movieTitlesArray.includes('alien') ||
    movieTitlesArray.includes('benjamin')
    ) {
    return movie;
    }
    }).length;
    console.log(countTotalMoviesForKeywords);
  • Exercise 7: Not sure I understand your solution here. duplicatedWordsInATitles is not really used and you don't seem to be returning the movies containing duplicate words in their title.
    // word in the title duplicated
    const duplicatedWordsInATitles = [];
    movies.map(movie => movie.title.split(' '))
    .forEach(title => title.filter((word, index) => title.indexOf(word) !== index && word !== 'the' && word !== 'The' && word !== 'of' && word !=='and'? duplicatedTitles.push(word) : false));//duplicatedTitles.push(`In title:${title.join(" ")} this word:${word} is duplicated`) : false));
    console.log(duplicatedWordsInATitles);

hyfBay - get the okay'est products here - continued

Nice work here ๐Ÿ’ช Next time remember to remove commented code, it is a bit easier to give feedback that way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.