calling a function on a function is it possible?

  • A+

in the following code

const express = require('express'); const app = express() app.use(express.static('public')); 

express is a function so how it call "express.static('public')" method on it? is it possible in JavaScript to call a function which is inside a function


A functions is not only a first class function, but also a first class object and can contain properties.

function foo() {} = function () { console.log('i am bar'); };;


:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: