You can create global variables from the above by attaching properties into the window object (if you are on a browser based execution environment). You cannot possibly introduce dynamically named function scoped (local) variables.
The only solution that may come to my mind involve creating a closure with manually written argument names - nothing really usable. It's not that we all never thought about it, mind you. But in the end it's not just worth the effort.
var fname = yourobject.fname; var lname = yourobject.lastname;windowobject (if you are on a browser based execution environment). You cannot possibly introduce dynamically named function scoped (local) variables.o.fnameinstead offname.