As the Jazz held celebrations for their 40th season in Utah, and as the arena was filled with the purple worn for the majority of those years, the current Jazz found the best way to honor the legacy of the teams that had come before them.

They finally won a home game.

Just as the Jazz did in the 39 seasons previous, they avoided losing their first five games at home in 2018-19, winning Wednesday night’s game against the Dallas Mavericks 117-102.

Donovan Mitchell was electric in his return from an ankle sprain suffered over the weekend that cost him the Jazz’s Monday contest against the Raptors. He finished with 23 points, five rebounds, and seven assists, but it was his electrifying dunk to end the first half that will be remembered. Mitchell wound the clock down, then exploded around Dallas rookie Luka Doncic, finishing over poor Maxi Kleber just before the buzzer sounded.

It was a fitting end to a dominant first half for the Jazz, in which they simply outplayed a tired Mavericks squad from start to finish, outscoring them by a margin of 68 to 45. For the most part, the Jazz simply passed around the Dallas defense on the first or second try, getting great looks from all over the floor.

The Mavs responded late in the third quarter. Utah had sustained a 21-point lead through the final minute of the period until Derrick Favors got tangled up with Dwight Powell, then hit him. The resulting flagrant foul — penalty 1 — and technical foul led to a 5-point Dallas play. A few minutes into the fourth, frequent other trips to the free-throw line had cut the Jazz lead to nine.

Mitchell again had the answer in dazzling fashion, driving to the rim for four consecutive points, then finding Jae Crowder in the corner after a jack-knife, up-and-down pass that showed off his athleticism as much as the dunk had. The Jazz regained a double-digit lead, and they’d never relinquish it.

As part of the 40th season celebrations, the Jazz wore throwback purple jerseys, largely identical to the ones they wore from 1984 to 1996. While the shorts matched those from the era, the shorts’ length did not.

That might have been a disappointment to Darrell Griffith, the Jazz legend known as Dr. Dunkenstein who came to Vivint Arena to watch the game — and his fellow Louisville product Donovan Mitchell dunk the ball.

“It’s always good watching him, especially given where he came from — Louisville — and watching how he’s progressed and improved,” Griffith said. “We talk when it’s necessary, but I pretty much let him do his thing.”

Mitchell wasn’t the only Jazzman with a good game, though. Alec Burks was Utah’s second-leading scorer with 18 points, including 4-of-5 shooting from behind the arc as he took advantage of a Dallas defense that was willing to let him shoot. Crowder didn’t have as good of an outside shooting night (just 1 of 6 from behind the arc), but had 14 points and a game-high +13 plus-minus.

And critically for the the Jazz, Rudy Gobert was back to his impactful best as a defender, finishing with 17 points, 10 rebounds and a season-high four blocks, though he did foul out with three minutes left.

As usual, Gobert made his presence felt in the Mavericks’ shooting profile: they took 45 percent of their shots from the mid-range and only 28 percent from the rim. Only Doncic felt comfortable — the star rookie from Slovenia finished with a game-high 24 points on only 14 shots. But even beyond Gobert, the defense played at a higher level than they had over the Jazz’s four-game losing streak.

“I thought we really competed,” Jazz head coach Quin Snyder said. “Ricky, in particular, his pick and roll defense, and competing at the point of attack. We wanted to play our defense with some heart, and I thought we did that.”

That the Jazz got the turnaround going Wednesday puts them into a better position for Friday’s contest against the returning Gordon Hayward and the Boston Celtics. Hayward, the All-Star who famously left the Jazz in free agency over a year ago, isn’t the Celtics’ most important piece at the moment: he’s averaging just 10 points per game in relatively limited minutes. Despite that, it’s one of the most anticipated Jazz games in recent memory.

The Jazz, after saying all of the right things about not looking past their contest against Dallas, now are publicly, and maybe sarcastically, treating it like a normal affair.

“[The arena] could be empty, I don’t know,” Favors joked. “We gotta see. I mean, it’s going to be like any other game.”