JavaScript
変数名または式をプレースホルダ ${ } 構造内に含める
${ 変数名 }
例) 参考 https://developer.mozilla.org/ja/docs/Learn/JavaScript/First_steps/Strings
${ 変数名 }
例) 参考 https://developer.mozilla.org/ja/docs/Learn/JavaScript/First_steps/Strings
let score = 9; let highestScore = 10; let output = `I like the song "${ song }". I gave it a score of ${ score/highestScore * 100 }%.`;
0 件のコメント:
コメントを投稿