Etudier le code précédent : https://jsfiddle.net/dupont/Lgre6msz/2/
On peut changer le code avec
class BD{
/**
* Finds items based on a query given as a JS object
*
* @param {function} function The function to filtre the query
* @param {function} callback The callback to fire when the query has
* completed running
**/
find ( fxFilter, callback) {
callback(this.villes.filter( fxFilter))
}