- string
- number
- boolean
- null
- undefined
- object
- String
- Number
- Boolean
- Object
- Function
- Array
- Date
- RegExp
- Error
So what is the difference between string and String? Answer: string actually is a string while String is just used to new up a string.
var foo = "bar";
var baz = new String("qux");
This is another insight from Kyle Simpson's book "this & OBJECT PROTOTYPES" which I am really enjoying reading!
No comments:
Post a Comment