Adding FixedJoint2D with script with custom damping ratio?

I am trying to solve a simple thing, and maybe I am not searching for it right but any help appreciated. I am adding a FixedJoint2D to a rigid body, but I don’t know how to add that FixedJoint2D with a damping ratio of 1. This is the code I’m using for that.

 if (hold)
{
     gameObject.AddComponent(typeof(FixedJoint2D))
}

How do I get the joint I’ve added to have a damping ratio of 1? Or any of the variables associated with that fixed joint changed at all? Thanks for help.

AddComponent returns a reference.

Assign that to a local variable and you can do what you like with it parameter-wise.

                var fj : FixedJoint2D;

Wherever you got that from, never go back there. Why? The above code is Javascript / UnityScript which has been deprecated for 10+ years and extinguished from Unity for at least 7 years.

The correct C# syntax would be:

var fj = gameObject.AddComponent<FixedJoint2D>();
fj.whatever = set-to-whatever;

See the docs for FixedJoint2D to learn what whatever can be.