Object Type in JavaScript
I will start with a definition of what I believe a data type is;
Data Type A description of how expressions are characterised internally and how they can be combined and manipulated.
My question is about the phrase 'loosely typed'; a lot of references describe this in terms of variables not needing to have their type specified.
If we look at JavaScript, functions can be passed as values, and can also behave like 'classes' (I am aware that JavaScript is class-free and uses Prototypal Inheritance etc.)
Is it correct to say that since JavaScript is loosely typed then the statement above holds.
If not, then why can functions behave like 'classes' or be passed as values?
Thank you,
YMas
|