「Google Apps Script」toUpperCaseで英字の小文字を大文字にするサンプル

構文
対象文字列.toUpperCase()
toUpperCaseメソッドを利用して、英字の小文字を大文字にします。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function myFunction() {
const strA = "arkgame";
console.log(strA.toUpperCase());
const strB = "Study";
console.log(strB.toUpperCase());
const strC = "テスト";
console.log(strC.toUpperCase());
}
function myFunction() { const strA = "arkgame"; console.log(strA.toUpperCase()); const strB = "Study"; console.log(strB.toUpperCase()); const strC = "テスト"; console.log(strC.toUpperCase()); }
function myFunction() {
    const strA = "arkgame";
  console.log(strA.toUpperCase()); 

  const strB = "Study";
  console.log(strB.toUpperCase()); 

  const strC = "テスト";
  console.log(strC.toUpperCase()); 
}

実行結果
ARKGAME
STUDY
テスト

Google Apps Script

Posted by arkgame