Advertisement
DvDty

imot.bg

Jun 21st, 2022
1,038
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let prices = $('.price')
  2. let descriptions = $('[width="520"]')
  3.  
  4. for (let i = 0; i < prices.length; i++) {
  5.     price = prices.eq(i).text().replace(/\D+/g, '')
  6.     squaring = descriptions.eq(i).text().match(/\d+/)[0]
  7.  
  8.     prices.eq(i).append(' ' + Math.ceil(price / squaring) + '/кв')
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement