Performing deposits (to lend) and borrow funds is quite straight forward. The code examples in the documentation here and here should be sufficient.
However if you are looking for more examples, the following may be helpful.
This section is a work in progress.
Deposit, Borrow, Repay with Web3.js and React
Also see the Community Contributed resources section.