0

I was studying up on some web sites and came across an interesting snippet of code that basically looked like this:

   $("#id")["addClass"]("addedClass");

I understand what it is doing but what is this operation called? Is it considered jQuery or Javascript? I haven't seen this before. In the past I would've done something like:

 $("#id").addClass("addedClass");
Wee Wei
  • 19
  • 2
  • 1
    The first is same as second. Object elements can be accessed by `.` operator as well as array brackets notation. – Tushar Jan 26 '16 at 06:32
  • Thanks everyone. I didn't even know what it was called and therefore stuggled to even begin searching here. Thanks for the link as well. – Shane Berezowski Jan 26 '16 at 06:57

0 Answers0