advanced calc to js homework