So you got a job offer. Instead of yelling "I quit!" and flipping a table on your way out the door, take Dev Bootcamp Career Developer Bie Aweh's advice on how to leave your old job, without burning any bridges:
Give notice (more is better)
Two weeks might be the standard, but it's really not enough. The more senior you are, the harder it'll be to fill your position. And if you have equity in that company, you'll want them to continue to be successful so you can realize the benefits of your work.
It's best to give notice in person. Schedule some time with your boss and explain that you have an offer, you're taking it, and that you're going to resign.
Wrap up your work
Since you're the one leaving, help your company retain all the work and knowledge you learned. Organize your files. Tell your team about and pass on what what you were working on. You should be setting up your replacement for success.
Do an exit interview
Exit interviews are an opportunity for you to get and give honest feedback. You might have to schedule it yourself, but usually your boss or HR will set it up. You can express frustration, since that's often a reason people leave their jobs, but try to offer solutions too.
Leave on good terms
Don't check out and say "Well, I'm out of here in two weeks." You might work with people from your team in the future!
A classy move is to write your colleagues a personal note. You don't have to do it for everyone, but it's a nice thank you and a great way to keep your relationships going after you leave. Thank them for what they've done for you in the past and wish them luck.