Numbers, strings, and Booleans can be either primitives or objects. For example, you can create a string that is primitive, and you can create another that is an object:
var name = 'John Doe';
var email = new String('john@example.com');
, ( email) . - , . , . JavaScript . :
var name = 'John Doe';
var email = 'john@example.com';
:
var to = name + ' <' + email + '>';
, , email :
var index = email.indexOf('@');
, . , JavaScript , .