javascript code for es101-06 module