function update(line) {
    let [name, rarity] = line.split(" - ")
    if (catalog[name] != undefined) {
        let plant = catalog[name]
        plant.rarity = (Number(rarity))

        
        }else {
        console.log('error');
    }
}
// - if the plant exist in the catalog, update its rarity ( as number )
if the plant exist in the catalog, update its rarity ( as number )
if the plant exist in the catalog update its rarity ( as number )
function update(line) {
    let [name, rarity] = line.split(" - ")
    if (catalog[name] != undefined) {
        let plant = catalog[name]
        plant.rarity = (Number(rarity))
        }else {
        console.log('error');
    }
}
function update ( line ) { let [ name , rarity ] = line . split ( " - " ) if ( catalog [ name ] != undefined ) { let plant = catalog [ name ] plant . rarity = ( Number ( rarity ) ) } else { console . log ( 'error' ) ; } }
if the plant exist in the catalog, update its rarity ( as number )
if the plant exist in the catalog update its rarity ( as number )