GithubHelp home page GithubHelp logo

js-practice's Introduction

Javascript practice

I prepared javascript exercises, which I hope will help you to improve your coding skills. I do not affirm my solutions are the best ways to solve each of the exercises, but I believe they could help you to find some new ideas if you stuck.

Prerequisites

npm i to install jest and lint

Exercises with arrays

To run check your solutions use npm run testArrays.
Also, you can check mine by running npm run testArraysSolutions.

List of tasks

  1. fill - Write a method that creates a new array with given values.
  2. reverse - Write a method that reverts input array.
  3. compact - Write a method that clears array from all unnecessary elements, like false, undefined, empty strings, zero, null.
  4. fromPairs - Write a method that returns an object composed of key-value pairs.
  5. without - Write a method that returns an array without listed values.
  6. unique - Write a method that returns a duplicate-free array.
  7. isEqual - Write a method that makes a shallow compare of two arrays and returns true if they are identical.
  8. flatten - Write a method that turns a deep array into a plain array.
  9. chunk - Write a method that splits an array into parts of determined size.
  10. intersection - Write a method that creates an array of unique values that are included in all given arrays.

Exercises with objects

To run check your solutions use npm run testObjects.
Also, you can check mine by running npm run testObjectsSolutions.

List of tasks

  1. isPlainObject - Write a method that verifies argument is a plain object, not an array or null
  2. makePairs - Write a method that returns a deep array like [[key, value]]
  3. without - Write a method that returns new object without provided properties
  4. isEmpty - Write a method that makes a shallow check is object empty
  5. isEqual - Write a method that makes a shallow compare of two objects
  6. invoke - Write a method that invokes an array method on a specific path
  7. isEmptyDeep - Write a method that makes a deep check is an object empty
  8. isEqualDeep - Write a method that makes a deep compare of two objects
  9. intersection - Write a method that finds shallow intersections of objects
  10. intersectionDeep - Write a method that finds all intersections of objects

js-practice's People

Contributors

andrewborisov avatar dependabot[bot] avatar notnotdee avatar

Watchers

 avatar

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.