Add github javascript library

I want to add a javascript library from github in my webpage, in order to merge it with my code… How can I do that? I want to add this library: https://github.com/kriskowal/q

I’m trying to run the code, but it give me an Uncaught ReferenceError: Q is not defined. What should I do?

You need to brings this file in with a script tag: https://github.com/kriskowal/q/blob/master/q.js
So you need to download that file and keep it in your project.
You can decide where you want to keep your imported javascript files and refer to them from your script tags import: https://www.w3schools.com/tags/att_script_src.asp