Implementation of 'Include' function on JavaScript