How to call the contract function using truffle console?

This is my first time using truffle console to call deployed contract function. I don’t know how to call getUserByIndex by index 1. The possible answer to what my question is truffle console and then User.deployed().then(function(instance){return instance.getUserByIndex(1);}) However, after I type that I’ve mention above to my console, I still failed to call getUserByIndex() by…