Basic Javascript and AI coding excercise.