# Libraries via CDN in JavaScript

Libraries don't have to be downloaded into your project. Often, library authors place library codes on special sites that create direct links for connecting libraries. Such sites are called CDN, which stands for Content Delivery Network.

For example, in the lodash library documentation, you can find a link to the CDN and connect this library in your HTML file without downloading it:

`<!DOCTYPE html> <html> <head> <title></title> <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script> </head> <body> </body> </html>`

The advantage of a CDN is speed. As a rule, content delivery networks deliver files faster than regular hosting. In addition, if you are using a popular library, then there is a high probability that this library is already in the user's browser cache and it will not be downloaded again.

The disadvantage of CDN is that one day the link to the library may stop working and your site will crumble.

Connect the underscorejs library via CDN. Check if the library is connected.

← →
↑
en ru