Yes there is differences, the main one IMHO is when occurs the verification that involved data types provide the required interface for the template algorithm. In C++/Java this is done at compile time while in JS this is done at execution time.
In the provided example there is no implementation provided as an argument to the constructor (it is only an int value M), “implementations” are directly provided to the function without prior knowledge. As stated in the article: “there is no need to identify the class T here as the function fn will only execute properly if its arguments support a getValue() method”.
But of course it is hard to really compare a concept between static and dynamic languages, as you said depending on the use case there are many subtle differences.