how to get name of variable in console.log
code1 = 3;
code2 = 1;
code3 = 2;
console.log(Math.min(code1, code2, code3))
result is 1 but want also to print in console.log as :
code2 =1
how to get name of variable in console.log
code1 = 3;
code2 = 1;
code3 = 2;
console.log(Math.min(code1, code2, code3))
result is 1 but want also to print in console.log as :
code2 =1
2
Answers
You can use it like this