How to create LP and add liquidity into it? In Sushiswap or TraderJoe

In Javascript:

In Sushiswap, or in its fork TraderJoe, how does one a) create a LP and b) add liquidity into it and c) destory it

properly?

Altougth there're tests in both projects, there's no explanation whatsoever what does what, and what's it for in the first place, in what sequence it has to be done. And what are the steps.

And there's lack of comments. And no examples in Javascript, for developers!
What a nonsense.


There're explanations and documentation only for users -- how to do all that via UI of Sushiswap and TraderJoe. But I need to replicate that in JS, as a developer, and understand how it works in code.