NEW YORK — When Taylor Swift released the Grammy-winning, banjo-tinged “Mean” in 2010, haters fired shots at the then-20-year-old.

Four years later, Swift says she’s grown and was able to write her new single “Shake It Off” about others dissing her from a new perspective.

“We are all getting our hearts broken, being built up, being let down, feeling disappointed, feeling joy, feeling all these emotions, but what I’ve noticed is that even when it’s the same kind of emotion that I’m feeling, I process it and feel it differently now than I used to,” she said in an interview last week. “And I think that’s a factor of growing up, but I’m pretty proud of the way it’s gone.”

All signs point to growth as Swift released her fifth album, “1989,” on Monday: She’s left behind her country roots to go full-blown pop, she’s moved to New York City and she hasn’t really thought about dating in nearly two years.

“I think it’s a beautiful thing to be in love. If you’re in a good relationship, that’s wonderful, but you are factoring someone else’s feelings, schedule, opinion and priorities into your own feelings, schedule, thoughts, opinions, priorities. And in the last year and a half, that just hasn’t been something that I’ve been interested in,” she said.

Swift, 24, began dabbling in pop when she released “Red” in 2012, which featured the pop smashes “We Are Never Getting Back Together” and “I Knew You Were Trouble.” Max Martin, who co-produced those songs with Shellbeck, is the executive producer behind “1989” and has created a slew of pop anthems, from Britney Spears’ “…Baby One More Time” to Kelly Clarkson’s “Since U Been Gone.”

“I found myself wanting so badly to explore this new territory, but I felt absolutely terrified to go too far in that direction because I thought people would be angry,” Swift said about going pop. “I think that the country community wasn’t surprised that I made a pop album; I think they were surprised when I was honest about it.”

It’s a bold move for Swift, who moved to Nashville as a teen to pursue her singing career. Her first single was called “Tim McGraw.”

“We’ve had a great relationship with 2,000 country radio stations … and so talking it through, she still welcomes their support,” said Scott Borchetta, the president and CEO of Swift’s longtime label home, Big Machine Records. “If the moment ever strikes her again and she decides, ‘You know what, the music I’m making now is country,’ I think she’ll be welcomed back with open arms.”

Swift says she’s not sure she will record country music again — not because she doesn’t want to, but because it’s too early to tell.

“If I wanted to make ‘Red’ 2.0 I could have done it, but I … wanted the focus to be on the sound of the record rather than everyone dissecting each lyric to see who these songs are about,” she said.

“1989” is pure pop fun, featuring hook heavy jams, from anthemic moments like “Shake It Off” and “Bad Blood” to calmer grooves like “Clean,” featuring Imogen Heap. It’s also a sound that resonates with Swift’s fans, if a recent secret session at her apartment in New York City was any indication.

Swift invited 89 fans to her warmly decorated pad in Tribeca to preview “1989.” The feverish group of girls and boys (and moms) immediately jumped to the floor to sit on pillows as Swift sat in front of them. One girl couldn’t stop shaking.

“I’m a little worried about the shaking,” Swift said to the blonde teen, and then gave her a high-five to calm her nerves.

When she played “Bad Blood,” a song Swift wrote about a female pop singer she had a falling out with, a fan yelled as Swift gave background on the song: “It’s because she doesn’t have a Grammy!” Swift gave her signature coy look, as the crowd looked to the two Grammy Awards atop her mantel, one of them for album of the year for 2008’s groundbreaking “Fearless.”

“Bad Blood” sounds like typical Swift, but most of the radio-friendly “1989” showcases a different tone in her songwriting. “Blank Space” was initially started as a joke: Swift said she had seen all of the tabloid stories about her and decided to write a song as if she was actually the media-created character.

“They’ve drawn up this fictitious sensationalized version of my life … and I couldn’t help but think about how interesting, although albeit untrue, this character was. She’s very interesting, you know, unpredictable and kind of reckless and impulsive and emotional, over-emotional mood swings and needy and clingy, but somehow alluring,” she said.

Another song, “I Wish You Would,” marks another growth area: Swift says she’s now friends with an ex.

“That’s a new concept for me actually, writing songs about things that have happened in romantic relationships and being able to run them past the person that they’re about,” she said.

Bleachers frontman and fun. guitarist Jack Antonoff, who co-wrote and produced songs on “1989,” calls Swift’s new sound “innovative.”

“She’s never complicated the process of writing and recording,” said Antonoff, who dates Lena Dunham, one of Swift’s best friends. “I think the reason why she connects with so many people is she’s not someone you want to be, she’s someone you want to be friends with.”

Swift, who credits living in New York City as part of her growth, said she’s completely comfortable in her skin.

“At this point in my life at 24, I have a very solid grasp on my identity — I know exactly who I am, but I know exactly what (the media) say I am,” she said. “I feel very comfortable joining in on the social commentary and joining in on the joke because I know exactly what it is — a joke.”