It is possible to format string like this:
text = 'text'
formatted = "Text: #{text}"
What about the following?
pattern = "Text: #{text}"
text = 'text'
formatted = ???
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Pattern formatting in coffeescript is a part of coffeescript->javascript compiler.
So,
instantly compiles into
It’s why
will throw an error “text is not defined”.
But you can wrap it in a function like this:
or like this: