Thursday 16 November 2017

javascript - Should I use single quotation mark or double to describe jquery?












I'm
confusing what I should use in jQuery.
Some use single some use double
quotation mark.
For
example



$('.class1').removeClass('class1')
$(".class1").removeClass("class1")


Also,
alert as
well



alert("aa");
alert('aa');


which
one is correct?


itemprop="text">
class="normal">Answer



This is
more a matter of preference than correctness. See this question for more details: href="https://stackoverflow.com/questions/242813/when-to-use-double-or-single-quotes-in-javascript">When
to use double or single quotes in JavaScript?



No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...