Problem with switch

Good morning. I’m trying to do a switch that when you input human, animal or plant it gives a brief descrpition of the choosen topic. I can’t get it to work in the console i see no erros, but when i put anything and click send i don’t get anything back.
Here is the html code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
    <label for="specie">Write a specie</label>
    <p>Human, plant. animal or something different</p>
    <input type="text" name="" id="specie1">
    <input onclick="specie()" type="button" value="Send">

    <div id="result"></div>

    <script type="text/javascript" src="ejercicio1.js"></script>
    
</body>
</html>

And here is the javascript code

function specie(){

var cond = document.getElementById("specie1").value;
var result;
cond = cond.toLowerCase();




switch(cond){
    case 'human':
        result='The human is'
        document.getElementById('specie1').value='';
        document.getElementById('specie1').focus();
    break;
    case 'animal':
        result='The animal is'
        document.getElementById('specie1').value='';
        document.getElementById('specie1').focus();
    break;
    case 'plant':
        result='The plant is'
        document.getElementById('specie1').value='';
        document.getElementById('specie1').focus();
    break;
    default:
        result='A thing is'
        document.getElementById('specie1').value='';
        document.getElementById('specie1').focus();
}
}
document.getElementById('result').innerHTML=result;

Thanks beforehand.

the last line of code you have should be inside the function, so move the last } to be after everything else.

}
document.getElementById('result').innerHTML=result;
}