initial commit of dialog functions for user interaction in JS exercise