JavaScript was developed to be
- Light weight. A Windows 95 PC might have 0.002 gig of memory (2MB) and be running a fast Pentium processors at 0.06 GHz (60Mhz). Such a set up did not have the resources to load and execute Microsoft C++ while doing anything else. Memory paging worked overtime.
- Faster than Java. Cranking up the Java engine in early Netscape browsers took forever, so visiting a web site using Java involved a long wait to load the plugin the first time a Java applet was encountered. For that reason alone use of Java client side never really took hold.
- Easy to learn and use. This may have gone a bit overboard, but
- Undeclared variables were supported (not the greatest idea),
- All variables are like a Basic Variant variable - no need to declare or manage variables types.
- No pointers. Well, there are and they're called "object" variables, but no need to deal with memory addresses, struct or union data types, or classes.
- Used a syntax familiar to programmers familiar with the C family of languages.
- Defined and introduced an environment with objects and built in access to global objects for programming within web pages.
- Had a few mistakes, like returning "object" for the data type of null, and claiming objects were classes, but never mind.
Arguably JavaScript is a high level language, particularly in comparison to C ... known to many as a "high-level assembly language."
Finally there's cost effectiveness in learning and using some minimal JavaScript to affect a web page - which when introduced was all it was for.
Other choices could be ruled out fairly simply: a high level language such as Pascal was probably not considered, Java was too slow, C too low level and Visual Basic for Applications (vba) was a proprietary product of Microsoft Corporation.
TLDR;
It was designed to look like something developers already knew and wouldn't involve much effort in checking out. Netscape wanted developers using web page "programming" to encourage use of their browser. Alternative truths were told, including using "Java" as part of the language name.
More:
As covered on MDN WebAssembly is not a replacement for JavaScript, but in a browser context does support calls to JavaScript function wrappers.
A preliminary of JavaScript was introduced under the name of "Livescript" in version 2.02 beta of Netscape navigator in 1995. It introduced the <script>
tag and exposed parts of Netsape's browser internals to page scripts - mostly to support injecting HTML into page source and dealing with mouse and keyboard events generated by form controls and page navigation.
At this time (the outset) there was neither demand nor a web eco-system for WebAssembly to fit into: interfaces for XMLHttpRequest's, the DOM, CSSOM, WebGL, IndexedDB, Web Audio API, etc. were years or decades away from being developed, implemented and standardized. Netscape was creating a demand for web scripting in the first place, using a scripting engine [initially] written by Brendan Eich in ten days.