Domanda di colloquio di Shopflo

Given two div a and b. keep b inside a and give colours using javascript.