How to run an animation in code

hi everyone, my problem is that i’ave made an animation i’ave tried to write some code for it but it isn’t working, i’ave looked all over and i can’t find one which works. i’ave got some current code which i have written. (the animation name is reload, fire3 is r)

function update()
{
if(Input.GetButtonDown(“Fire3”))
{
animation.run(“reload”);
}
}

The function is Play(), not run.

Try:

function Update() {
  if(Input.GetButtonDown("Fire3")) {
     animation.Play("reload");
  }
}