Can anyone help me to convert this to proper JavaScript?
<script>var datePostForAll = '<div class='date-header'><data:post.dateHeader/></div>';</script>
Thank you!
:*
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.
It is proper JavaScript. It’s the same as writing:
They’re used
'instead of an apostrophe so they don’t have to escape'and"marks inside the string. The<data:post.dateHeader/>is custom Blogger markup and will be evaluated when it is run. Because the contents of<data:post.dateHeader/>may include quote marks, they chose to wrap the string in'to prevent accidentally introducing unescaped elements into the string. Regardless, as this will be outputting a date, wrapping it in quotes should be fine.