can some one please tell me how can i make the send function read the email object from the next code?
var email = {
to: '[email protected]',
subject: 'new email',
text: 'helloWorld'
}
function send() {
var sendMe = new email();
console.log(sendMe.subject);
}
send();
i get this error i also tried to declare the email as follow :
var email = new object();
and it didn't work
Uncaught TypeError: object is not a function