>>513143016
PERM != H1B
There absolutely no requirement that companies hiring H1Bs look for US workers. They can have a "temporary" H1B here for two years and then renew for two more. Because that's "temporary", they're not required to look for Americans. They're only required to pay the "prevailing wage", which itself is driven down by the presence of H1Bs.
PERM is when they're trying to justify being given a Green Card, meaning they can live in the US for the rest of their lives. In that case, the company has to lie and say there are no Americans able to write JavaScript. Once it is approved, they're a permanent part of the US labor market.