Git Product home page Git Product logo

group-ex-jan-17's Introduction

JS Basic exercise:

let data = [8, 79, 14, 94, 33, 31, 2, 74, 46, 72, 75, 40, 5, 1, 48, 81, 99, 4, 43, 68, 90, 23, 97, 10, 55, 11, 20, 50, 70, 83, 47, 25, 86, 30, 60, 96, 76, 22, 67, 77];

Create a function that sorts the initial number array, from small to big.

Create a function that calculates a total of this array.

Create a function that checks if the total is odd or even. Return true if it's even, false if it's odd. Print "Array is odd" or "Array is even" in console, for each case.

Create a function that extracts all odd numbers from this array. Do the same for extracting all the even numbers.

Optional:

Create a function that calculates the sum of the odd numbers, the even numbers, compares the sums, and returns the array that has the greatest sum.

Optional:

Create a function that receives the array as a parameter, and a callback as another parameter. The callback will be an arrow function that will be applied to each element in the array. so for example (x) => x * 5;

group-ex-jan-17's People

Contributors

doublemacro 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.