summary width

summary width

I got a table, first tr got 10 td, how to get the sum of the first three td's width

all I know is like

  1. var $sum = 0;
  2. $('tr:first td:lt(3)').each(function() {
  3.       $sum += $(this).width();
  4. });

  5. console.log($sum);

is there any solution via jQuery?