- Open your command-line application, and navigate to your workspace.
- Create a new folder named 12-02-create-set-from-data.
- Copy or create an index.html that loads and runs a main function from main.js.
- Create a main.js file that defines a main function with an array of string. Create a new set with that array as a constructor argument:
// main.js export function main() { const rockets = [ 'US: Saturn V', 'US: Falcon Heavy', 'USSR: Soyuz', 'CN: Long March', 'US: Saturn V', 'US: Saturn V' ]; const rocketSet = new Set(rockets); console.log(rockets); }
- Start your Python web server, and the following URL in your browser: http://localhost:8000/.
- You should see the following output: