(no title)
wolfgang42 | 7 months ago
const template = ({name}) => `hello ${name}`;
const n1 = template({ name: 'joe' });
(Tagged templates won’t help here because the bit in curly braces is an expression which is evaluated to a value first; you’d need some kind of macro system to get access to the original variable name at runtime.)
No comments yet.