我只想对代码的这一部分 ${a}\_${b} 使用 repeat(4) 并从重复中排除下划线以在评论中获得答案
I want to use repeat(4) for this part of the code ${a}\_${b} only and to exclude the underscore from repetition to get the answer at the comment
let a = 21;
let b = 20;
console.log("Write Your Code Here"); // _21_2021_2021_2021_20_
代码是什么?
是这样的吗?
let a = 21; let b = 20;
console.log(`_${`${a}_${b}`.repeat(4)}_`); // _21_2021_2021_2021_20_
let a = 21;
let b = 20;
console.log("Write Your Code Here"); // _21_2021_2021_2021_20_
代码是什么?
是这样的吗?
let a = 21; let b = 20;
console.log(`_${`${a}_${b}`.repeat(4)}_`); // _21_2021_2021_2021_20_