This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
dnd-mongo: | |
# image: mongo:latest | |
image: dnd-mongo:latest | |
ports: | |
- "27017:27017" | |
environment: | |
- MONGO_INITDB_DATABASE='admin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
scrivi una funzione che a partire dall'array `input` restituisce un oggetto composto dalle seguenti proprietà: | |
– "near": un array di oggetti con proprietà "distance" superiore/uguale a 0 e inferiore a 4 | |
- "medium": un array di oggetti con proprietà "distance" superiore/uguale a 4 e inferiore a 8 | |
- "far": un array di oggetti con proprietà "distance" superiore/uguale a 8 e inferiore/uguale a 10 | |
nell'oggetto finale non devono essere presenti oggetti con proprietà "type" uguale a "a" | |
*/ | |
const input = [ |