Heim  >  Fragen und Antworten  >  Hauptteil

javascript - ES6 和 coffeescript 中的多行字符串你更喜欢哪种?

ES6 中使用 :

` (重音符,tab上面那个键)

html =
<strong> cup of coffeescript </strong>;


CoffeeScript 使用三个引号(""" 或 ''')

html = """

cup of coffeescript

"""
"

感觉重音符和单引号不好区分,更喜欢三个引号的写法和 python 一样。
有没有必要上书W3C要求修改呢?

PHPzPHPz2749 Tage vor371

Antworte allen(1)Ich werde antworten

  • PHP中文网

    PHP中文网2017-04-10 14:50:37

    coffee

    Antwort
    0
  • StornierenAntwort