JSFiddle - React, Tailwind, and code Playground
by Vladymyr Shevchuk
JavaScript
const sum = (a, b) => a + b;
/* console.log('tracksList', Symbol(), { foo: 'bar'}, sum); */
log(Symbol(), sum, 123, "1000");
function log (...props) {
const result = []
for (const item of props) {
try {
console.log(item.valueOf())
result.push(item.toString());
} catch (error) {
console.error(1111);
const result = Object.prototype.toString.call(item);
result.push(result);
console.log(result)
}
}
console.log('result', JSON.stringify(result));
}