Hey there, I am a C++ developer who is venturing into the world of JavaScript. While exploring JavaScript syntax, I stumbled upon something that resembles templates in C++. For example, while going through RxJs tutorials, I came across this line of code:
const subject = new Subject<number>();
I'm curious to know what aspect of the JavaScript language this syntax represents. In C++, "Subject" would be a templated class with "number" serving as the type parameter.
When I attempted to search for "JavaScript template," my results led me to JavaScript templated strings, which seems like a different concept altogether.
By the way, I must admit that mastering JavaScript has proven to be quite challenging for me. Despite currently delving into "Eloquent JavaScript," I didn't come across the syntax mentioned above in that book. Can anyone suggest better learning resources to help me grasp JavaScript more effectively?