Modern JS or any JS is such a different language with not even a tenth of the features that C++ has, it's ridiculous to compare them. It's no wonder it looks "cleaner" -- it just isn't doing anything like what C++ does.
This could however be done without introducing angled brackets. myFunction(myFirstClassType); which is what more and more languages nowadays do like Zig.