What is function createServer(requestListener?: RequestListener):server?

I am new to NodeJS.
I am not very familiar with this statement:function createServer(requestListener?: RequestListener):server. Why does this method have :server, and why are the parameters inside not separated by commas, but uses ?:?

Any ideas on how to fix this problem

27 thoughts on “What is function createServer(requestListener?: RequestListener):server?”

Leave a Comment