Closed jbruni closed 8 years ago
JavaScript is loosely-typed language? Might be more appropriate. Maybe @getify could make this more true somehow...
I think it is fair to say JS is not statically typed. It differs from C#, Java in that a variable can refer to difference types of values at runtime
JavaScript most definitely has types. Moreover, JS has a rich system of conversions between its various types, generally called coercion.
Saying JS is not typed is to nitpick about the word "type" as compared to other languages' definitions of that word, such as Haskell. Those arguments are pointless.
JS is not type-enforced (aka "statically typed"), in that the compiler does not check types and enforce type matches in operations. Instead, JS is loosely-typed (aka "dynamically typed"), meaning runtime conditions determine the type of a value for any given operation.
Thanks for chiming in @getify!
:+1: I appreciate the discussion, and I am learning new and interesting things as it goes.
Please check my comment here: https://github.com/FrontendMasters/front-end-handbook/commit/01b5dccdcd91ab4fcd40b87bbf0416d4dd23f15a#commitcomment-15361978
Pardon me for the light dose of irony.