coffescriptでswith文を記述し,node.jsで実行すると、以下のエラーが発生します。
/home/vagrant/node_modules/switch.coffee:14:17: error: missing " console.log "?????s?\"
なお、ソースは以下となります。
star = 5 switch star when 1 console.log "格安ホテル" when 2 console.log "安めのホテル" when 3 console.log "普通のホテル" when 4 console.log "良いホテル" when 5 console.log "豪華なホテル" else console.log "判定不能"
文法的に誤りはないと思うのですが、どこが誤っているのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/04/24 13:55