Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iiitm-jay/filterlistjavascript
A filter operation on a list in Javascript with test case
https://github.com/iiitm-jay/filterlistjavascript
Last synced: 25 days ago
JSON representation
A filter operation on a list in Javascript with test case
- Host: GitHub
- URL: https://github.com/iiitm-jay/filterlistjavascript
- Owner: IIITM-Jay
- Created: 2024-01-15T14:13:13.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-01-15T14:42:53.000Z (12 months ago)
- Last Synced: 2024-01-15T18:45:02.450Z (12 months ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Filter Operation on a list
A simple filter operation on a list in Javascript## Program Structure
```
root/
|-- listOperations.js (* Main source file containing the program logic *)
|-- testListOperations.js (* Test suite for the project *)```
## The Program Logic
The program does the following:
1.Accepts a list of integers as input.
2.Raises an error message if the length of the input list is not a multiple of 10.
3.Returns or displays a list of integers derived from the input list. Items at positions that are multiples of both 2 and 3 are removed from the result.## The Test Suite:
To test the written program icludes the following test cases
1. Valid output on valid input
2. If the list length is not a multiple of 10
3. Empty list## Test Results
After running the test file in the respectcive folder will get the following result:
![Test Suite Results](https://github.com/IIITM-Jay/filterListJavaScript/blob/master/filterListJavascript.png)