Still Learning

  1. Links (sets the constructor of) the newly created object to another object by setting the other object as its parent prototype;
  2. Passes the newly created object from Step 1 as the this context;
  3. Returns this if the function doesn't return an object.
<input type="checkbox" checked=true/>$('input').prop('checked'); // returns true
$('input').attr('checked'); // returns "checked"

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store