I need a way to save this snippet of JavaScript code, make some modifications to it, and then evaluate it at a later time. Unfortunately, the online converter I tried using didn't produce the desired outcome.
Original Code
$Lightning.use("c:app", function () {
$Lightning.createComponent("c:component",
{},
"customLogin",
function (cmp) {
console.log('test');
});
});
Current Error Output
var myvar = '$Lightning.use("c:app", function () {'+
' $Lightning.createComponent("c:component",'+
' {},'+
' "customLogin",'+
' function (cmp) {'+
' console.log(\'test\');'+
' });'+
' });';