LoginSignup
0
0

More than 1 year has passed since last update.

文字列 シングルクオートの盲点 式展開の際に注意!

Posted at

普段何気なく使っていたシングルクオーテーションと
ダブルクオーテーションの違いを調べたので、メモ書きしておきます。

ポートフォリオを作成している際に、
'#{user.index}'
とした際に、式展開が出力がされなかったため、色々と調べてみると
"#{user.index}"
のようにダブルクオートを使わないと式展開は出力されないみたいです。

また同様に
改行もダブルクオーテーションでしか使えないみたいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0