To compile the add code, use the following command: em++ add.cpp -s EXPORTED_FUNCTIONS="['_add']" -o add.js