Design
Before talking about Function in Javascript, You must know about the basic terms of Javascript. i.e…