New York City, in an effort to combat the gender pay gap, on Tuesday became the first U.S. city to ban employers from asking job applicants about previous salaries.