RealPage interview question

Hiring Manager asked me about my JavaScript experience. He asked me about requireJS and few other JS libraries. I answered his questions quite well. Hiring manager didn't seem to know what he wanted in a candidate. He kept on asking me questions which i was responding and then replied with what IF i do this what if i need this. After few weeks, recruiter called me and said they want to offer me a different role with less salary. They liked me but can't offer me that job with that salary. I was so surprised because the initial salary was also less than the market rate. They thought i will be a victim of their low ball offer, and to their surprise i declined their offer. For recruiters at RealPage. I was able to find a job with far more salary you were offering me for the position i interviewed you guys with. I did receive another call from the same recruiter later on after few months which i didn't take and they left me a voicemail to call them back. Advise to developers. They will try to low ball you and will try to bring you on with half the salary from the market. Please, Please do your research and know your worth. Don't fell victim to companies like them. Ask what you feel should be a reasonable salary.