rahulsain/Hackerrank_30daysOFcode

Day 21: Generics for JavaScript

kambleaa007 opened this issue · 4 comments

In TypeScript, we can generics for interfaces as well as classes,
Assign me Day 21: Generics for language TypeScript and JavaScript,
They are possible

Go ahead

JavaScript is a dynamically typed language and it doesn't have any generics. You can write a normal function/method, it will work for all types.

Still I tried it using ES6 with class and extends keywords, i followed stackoverflow answers

Ok @kambleaa007 is it working?

yepp,
I have tested for Array, String
image