A program is set of instruction that is run by a computer
Complexity is talking about the number of interactions between entities, if the number of entities increase then the interactions between them will increase exponentially, which will make it impossible to understand them.
Function are pre-written code which are like building blocks. They let us reuse code, easily share code and easily debug and test.
There isn’t any relationship with javascript and Java.
ECMAScript and Javascript are the same,