Anybody Please explain what is difference between two codes. i am trying to print JSON String.
1) console.log("Hello "+str);
2)
console.log("Hello");
console.log(str);
and this is working
this code is giving error console.log("Hello "+str); Converting circular structure to JSON
Why it is happening. Can anybody explain me what is difference in both code.
EDIT: this is my code
firstname="hello";
lastname= "hhf";
username= "dffflffl";
email="email@hitemai.com
password= "dddd";
var opts = {
url: 'localhost:8081/register',
method: 'POST',
body: JSON.stringify({first_name:firstname,last_name:lastname, user_name:username,email:email,password:password}),
};
Thanks