Iam sure it's pretty easy but I a new in javascript... I have search for a long time but I didn't find the solution In PARSE, I want to create an object and get the id went it save
var Obj = Parse.Object.extend("obj");
var obj = new Obj();
obj.save(null,{success:function(obj){alert(obj.id)}})
this alert the id but when i try to get the value I only get an undefined
var Obj = Parse.Object.extend("obj");
var obj = new Obj();
var objid;
obj.save(null,{success:function(obj){objid = obj.id}})
alert(objid)
undefined
Can you help me? Thanks