Browsers worked just fine before the advent of Javascript. Nobody had to use it, but they decided to use it because it was good enough. If some other language was deemed not good enough, there would have been more aversion to using it, and it would have never taken off.
Not to mention that there were other ways to execute code in the browser in those days. We have 'no choice' but Javascript today simply because it's the option that people eventually gravitated towards, forcing the others out of the market.
They decided to use it because it let you add things like drop-down menus (and falling snowflakes!) to your website, which made it look better than your competitor's website. Syntax was just the hoop to jump through to achieve that, and a very minor one at that. I doubt it would have made any difference.
You honestly believe that Javascript would have been equally successful if it had shared similar syntax to, say, Brainfuck? Especially given the alternatives that were available at the time? If syntax doesn't matter, I guess so, but I'm not sure I'm convinced.
I was talking specifically about the Scheme-like syntax that JS originally had. That syntax was a minor obstacle. BF-like syntax would be a far bigger one. Although what would probably have happened then is the same thing we saw with JS anyway - someone would have made a transpiler from something more sane - except it would have happened much faster.
There is a big difference, but since we're talking about any language "deemed not good enough", a language similar to Brainfuck definitely applies, and perhaps is the shining example.
The original suggestion was that people would use Javascript, or any other language in its place, simply by virtue of it being the only option. I argue that the wrong language would hamper adoption, and eventually some other language – like, say, VBScript which came only 6 months later – would have taken over.
Javascript persisted, and eventually completely dominated, because it was good enough. A language not good enough would have not had the same success, even given the otherwise same environment to grow up in.
Not to mention that there were other ways to execute code in the browser in those days. We have 'no choice' but Javascript today simply because it's the option that people eventually gravitated towards, forcing the others out of the market.