Require assistance.
I am currently working with two strings saved in separate variables;
var var1 = "Myname";
var var2 = "Myage";
var jsonObj = ?
console.log(jsonObj);
I aim to transform the console output of "jsonObj" into a JSON object (not as key-value pairs) constructed from these strings in the following format;
{"Myname":"Myage"}
Kindly provide guidance on how I can achieve this task?