Attendance for the 1978-79 National Hockey League games was up after four years of decline and down in the National Basketball Association for the second consecutive season, according to surveys by sportswriters Frank Brown and Alex Sachare of The Associated Press.

Figures compiled from published box scores also showed that NHL teams won the competition for the entertainment dollar in five of the eight cities where they share home arenas with NBA clubs.

NBA teams which had an advantage were the defending champion Washington Bullets, the Los Angeles Lakers and the Denver Nuggets.

The Bullets averaged 12,789 at Capital Centre to 9,925 for the NHL Washington Capitals.

The Lakers averaged 11,770 at the Forum in Inglewood, Calif., the Kings 9,992. The Nuggets more than doubled the average of the Colorado Rockies, 14,716 to 6,113 at McNichols Arena.

The Boston Bruins, Atlanta Flames, New York Rangers, Philadelphia Flyers and Chicago Black Hawks outdrew their NBA counterparts at home.

Though the assimilation of the Cleveland Barons by the Minnesota North Stars reduced the NHL from 18 teams to 17 and cut 40 games from the schedule, attendance reached its second-highest aggregate. The regular-season total of 8,837,946 was surpassed only by the 9,521,536 of the 1974-75 season, the last time crowds were up.

The average of 12,997 in 1978-79 was an increase of 1,154 a game over 1977-78. NHL clubs played to 80.1 percent of capacity this season, with nine teams achieving 85 percent and five of those 99 percent or better.

The Capitals averaged 9,925 per game on a season attendance of 397,007, a 37,857 drop from the 1977-78 season.

The Montreal Canadiens, who have won the Stanley Cup three straight seasons and charge the second highest average ticket price, $9.12, drew 16,719 for every game at the Forum, which seats 16,553.

That represented 101 percent of capacity, best in the league. Philadelphia and Buffalo reported sellouts for every game. The New York Rangers had the highest average actual count, 17,271 at 17,500-seat Madison Square Garden. The Colorado Rockies were lowest, at 6,113.

In the NBA the regular-season home average was 10,822, down 125 from the previous season. It was the second straight decrease.

Ten teams showed increases. The biggest gain was by Seattle's Super-Sonics, who moved from the Coliseum to the Kingdome and drew 5,916 more a game. They led the NBA in total attendance, 747,243, and in average crowds, 18,225, but ranked 15th in percentage of capacity, playing before 65.3 percent of the Kingdome's 27,894 seats.

Portland played to the best percentage of capacity, a full house for every game for the second consecutive season and 100 straight sellouts at 12,666-seat Memorial Colesium. Closed-circuit telecasts at the Paramount Theater averaged 1977, making the combined average 14,643.