Notably, directors, actors, and writers in American film and television are unionised. That does not mean that everyone is paid the same, nor that there is any concept as "seniority" (very rare in unions that represent highly skilled workers), nor that it is assumed that everyone has the same level of skill.
While the AMA and ABA are not conventionally considered unions, they do effectively control entry into and regulation of their respective professions. (Medicine and Law).
If brain surgeons benefit from being in a union, javascript developers probably do as well.