0

I am wondering what the exclamation point after a variable means in javascript?

const greet = name => `Hello ${name}!`;
  • 9
    It means the user is really happy to see you. On a more serious note, it's just a plain `!`, it's a normal char. – Zenoo Mar 16 '18 at 14:46
  • With the back-ticks ( slanted single quotation marks ) you can include variables between `${varName}` brackets -- anything that exists outside of them is plain text (string). So, this line will probably print out something like, "Hello Jason!" – Doug Mar 16 '18 at 14:47
  • 1
    Disagree, it could mean the user is very surprised :) – Sebastien D Mar 16 '18 at 14:47
  • 2
    Or it may mean that the app is happy to see the user! – gurvinder372 Mar 16 '18 at 14:47

0 Answers0