Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
  2.  
  3. function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
  4.  
  5. function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; }return arr2; }}
  6.  
  7.  
  8. var prescriptions = _toConsumableArray(document.querySelectorAll("[data-purpose='selected-prescription']"));
  9.  
  10. var titleDescStr = prescriptions.map(function (prescription) {
  11. var _ref = _toConsumableArray(prescription.children),
  12. titleElem = _ref[0],
  13. descElem = _ref[1];
  14.  
  15. return titleElem.textContent + ' ' + descElem.textContent;
  16. }).join('|');
  17.  
  18. console.log(titleDescStr);```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement