TGViewer
JavaScript test JavaScript test @js_test · 9.68K subscribers
Post #4863 712
❗️Что будет на выходе:
function tag(strings, ...values) {
return strings[0] + values[0] * 10 + strings[1] + values[1] * 10 + strings[2];
}

const num1 = 5;
const num2 = 10;

const result = tag`Double ${num1} and add ${num2}!`;

console.log(result);


Ответ: 'Double 50 and add 100!'

JavaScript test | #JavaScript
More from @js_test
  1. Oct 16, 2026❗️Что будет на выходе: const memoryLeak = () => { const cache = new Map(); const weakCache…
  2. Oct 16, 2026❗️Что будет на выходе: const createMathOps = (base) => { return { add: (x) => base + x, mu…
  3. Oct 16, 2026❗️Что будет на выходе: const person = { name: 'Alice', greet() { return `Hello, I'm ${this…
  4. Oct 15, 2026❗️Что будет на выходе: try { try { // Creating a custom error type class CustomError exten…
  5. Oct 15, 2026❗️Что будет на выходе: const createMathOps = (base) => { return { add: (x) => base + x, mu…
  6. Oct 15, 2026❗️Что будет на выходе: const team = { name: 'Eagles', players: ['Smith', 'Johnson', 'Willi…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →