No, I didn't get attacked by a bear. Nor have I seen one in a good long while, and never around Fairbanks. But it's always a good idea to be wary, and apparently bear attacks have been on the rise in recent years. This is attributed to many causes which I won't get into here because they're all the usual suspects when animal attacks are on the rise. (Stupidity and climate change, basically.) But still, for people who live in areas with bears, knowing bear safety is crucial.
My uncle is a forester. When he lived in Anchorage, one of his jobs was to catch bears that were coming too near humans and relocate them to safer areas. In case of a bear attack, and in addition to all of the tips about how to avoid one in the first place, he taught me a simple rhyme to remember what to do. "Brown down, black attack." Brown bears are enormous. They're the ones that are most likely to view a small human as not much of a threat, so trying to scare them off at that point isn't going to do you any good. Your best bet is to protect your most vulnerable areas (your stomach, the back of your neck) and play dead. Brown bears are interested in prey, not carrion, and you'll still likely be hurt from the bear prodding you to make sure you're really dead but you'll survive. Shane taught me that shooting a brown bear in the head is the worst place, if you have a gun. Their skulls are so thick, and shaped in such a way, that the bullet will just graze them and they'll keep running. Your best bet is to shoot it in the shoulders, as many times as you can, to disable the bear. Of course, bear spray is a better option for both you and the bear. It's more of an AOE (area of effect) type of defense so you don't have to worry about your hands shaking and your aim being off.
Brown bears, on the other hand, can be intimidated. If one seems interested in you the best tactic is to make yourself seem as big and scary as possible. Grab downed branches and hold them up or out to the sides. Look threatening, make noise. Make the bear think that it doesn't want to mess with you. If that doesn't work, don't run. They'll think your prey and they'll chase you. Not only that, but they're probably about as fast as you and they can climb trees better. Bear mace works well, but if all you have are your hands you need to punch the bear in the face. (How badass would it be to say, "I punched a bear"? It's like saying, "I got in a barfight with a bear and I won.")
Polar bears...well, unless you've got a steady hand and a big gun, there's not much you can do about them. Thankfully, most of us will never encounter a polar bear. Of course, there's the occasional friend who goes to the North Slope for either research or work....
(Yes, that's a picture taken by one of my actual friends. He said he was "scared shitless".)
There's a story I've heard several times about a building that, when it was being built on the Slope, had 2 foot square windows because it was assumed that polar bears (which are huge) can't fit through windows that size. Apparently, they can. I don't know what the end result was, because that's where the story ends, but it's a good lesson. The moral of the story is, "Don't underestimate polar bears, and if you can avoid it don't ever meet one because that's the only real way to survive." Unless you're this kid. Or this one. If you want to read more about bear attacks and what to do in case of one, here's a very good article.