こんにちはconsole.log出力をrainbowtizingするためのスクリプトがあります。 私が試したとき、console.logは生の文字列を出力しましたが、この出力を別のconsole.logにコピーすると、メッセージは正しい色で出力されます。 あなたはその理由を知っていますか? var input = document.getElementById('input');
in
console.logのような文字列で変数を置換したいと思います。 let str = 'My %s is %s.';
replaceStr(string, /* args */) {
// I need help with defining this function
};
let newStr = replaceStr(str, 'name', 'Jackie');
co
は、次のコードを考えてみましょう。ここで function displayParkReport() {
let title, part1, part2, part3;
title = '---PARKS REPORT---\n';
part1 = `Our ${data.all.parks.length} parks have an average of ${cal
私はjavascript/phpでWebアプリケーションを使用していますが、ユーザーがバグを知らせるフロントエンドのボタンであるバグファインダー機能を作っています。 現在の関数: function bug_finder(){
var txt = document.getElementById('bug_txt').value;
if(txt==''){
aler