\n
を\\\n
に置き換えることができます。最初の2つの\
は、単一のバックスラッシュが出力の一部になるという結果になります。最後に\n
が改行されます。あなたはその後、\\n
と\n
を置き換えるアプリケーションで実際の改行を使用する必要がある場合
console.log('\
FUN, FRIENDLY, * New PRIVATE PARTY ROOM with stage, 70" Satellite TV, comfortable lounge seating\
Exciting Bachelor Parties, Unique Surprise Birthday Parties, Divorce, Retirement....You Own IT!\
Party includes: 90 Minutes Open Bar, Dedicated Waitress, complimentary Dance of choice for the guest of honor, '.trim());
:
あなたのコードの出力は次のようになります。出力は
console.log('\nFUN, FRIENDLY, * New PRIVATE PARTY ROOM with stage, 70" Satellite TV, comfortable lounge seating\nExciting Bachelor Parties, Unique Surprise Birthday Parties, Divorce, Retirement....You Own IT!\nParty includes: 90 Minutes Open Bar, Dedicated Waitress, complimentary Dance of choice for the guest of honor, '.trim());
です