How to implement a library?! Javascript

In the following link : freeCodeCamp Challenge Guide: Telephone Number Validator

At solution 2, in Code Explanation, there is :

In such cases it might be much better and easier to implement this library libphonenumber

How can i implement this library, can someone help? Please :slightly_smiling_face:

I don’t know what section this is so I don’t know what level this is.

But I think they are saying that rather than write your own function here, you could have imported and used one of the functions from that library. You’ll learn about importing and using libraries at some point.

1 Like

I don’t think that they are saying that you should do it here. I think they are saying, “Hey, you’re going to all this trouble and I know that you have to because this is a learning problem, but in the real world, if you really, really needed something this strong and functional, you’d probably just import one from a library like this one.” That is sound advice - in the real world, there are people that have done these menial tasks and done them probably better than we will and maintain them and it’s easier to just import that other persons work. But you won’t be able to do that if this is an FCC challenge - that will come later as you build your own projects.

1 Like