Let's take another open source JavaScript library, Select2 (https://select2.Org/), which provides functionality to autocomplete and allow the user to add multiple selections to an input.
The source code for this library can be downloaded from the Select2 Git repository (https://github.com/select2/select2/releases).
The example HTML code to integrate Select2, giving us the ability to add multiple choices to the input, is as follows:
<html> <head> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script> ...