as known in javascript, a function defined as
function somefunc(){
}
is an instance of its constructor Function. But Function itself is a function either which implies the Function is an instance of Function. Is that what they are? Or there is some other relations between them.
Yes, that is exactly what they are.
Functionis an instance ofFunction, as are all functions, including constructor functions. This is completely expected and defined by the language specification. All functions also inherit fromObject, so the following statements are all true:Functions can be created using function statements, expressions or the
Functionconstructor. See Function constructor vs function statement.