javascript-questions icon indicating copy to clipboard operation
javascript-questions copied to clipboard

Clarify answer about functions in question 10

Open RinatValiullov opened this issue 5 years ago • 4 comments

I think it would be more informative to clarify that functions are first-class objects in question 10th: https://github.com/lydiahallie/javascript-questions#10-what-happens-when-we-do-this

RinatValiullov avatar Aug 01 '19 08:08 RinatValiullov

@RinatValiullov What is the difference between objects and first-class objects in JavaScript according to you? I'm asking this just to know what information we will gain.

A1rPun avatar Aug 08 '19 16:08 A1rPun

Hope this will explain better than me: First-class citizen

Compare to other languages it become valuable (just for clarification). But you can leave as objects

RinatValiullov avatar Aug 09 '19 12:08 RinatValiullov

If someone is coming from another language it will add some value, I agree.

A1rPun avatar Aug 09 '19 12:08 A1rPun

@A1rPun Found this article about First-Class Functions

First-Class Functions in JavaScript

RinatValiullov avatar Aug 12 '19 06:08 RinatValiullov