GithubHelp home page GithubHelp logo

lfx_sd_mentorship's Introduction

Project: LFX Sailing Downstream Coding Challange

Description

This repository contains a solution for the coding challenge which involves writing a program that accepts a list of integers, emits an error message if the list is not a multiple of 10 in length, and returns or prints a list of integers based on the input list, but with items at positions which are a multiple of 2 or 3 removed. The program is implemented in JavaScript.

Files

  • filterMultipleTwoThree.js: JavaScript file containing the implementation of the program.
  • filterMultipleTwoThree.test.js: Jest test file containing robust testing for the program.
  • package.json: JSON file defining metadata and dependencies for the project.

Usage

To use the program:

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Install dependencies by running npm install.
  4. Run the program using npm start.
  5. Optionally, run tests using npm test.

Implementation Details

The program checks if the length of the input list is a multiple of 10. If not, it emits an error message. If the length is valid, the program removes items from the list at positions that are multiples of both 2 and 3. The filtered list is then returned.

Example:

const filterMultipleTwoThree = require('./filterMultipleTwoThree.js');

const inputArray = [12, 10, 15, 18, 19, 13, 14, 10, 0, 18];
const filteredArray = filterMultipleTwoThree(inputArray);
console.log(filteredArray);

Dependencies

  • jest: Testing framework for JavaScript code.

Author

  • Name: Asad Ali

License

  • License: ISC

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.