image2text

Untitled

Aug 16th, 2019
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. LN N ]
  2. const blockchainPattern = /blockchain/gi
  3. // Please note my sarcasm and humor in these, I don't mean any of them.
  4. const sentences = [
  5. “"JavaScript isn't a _real_ language.",
  6. "What if we put it on the blockchain?",
  7. "The government's hacking our IoT devices, man!",
  8. "Pretty sure we can fix JavaScript with Blockchain."
  9. I
  10. // If we use match, we'll get back either null or an array.
  11. const matches = .map(sentence => .match( )b
  12. R L )
  13. // [null, ["blockchain"], null, ["Blockchain"]]
  14. // With test, we get a boolean back, making our type signature much
  15. // simpler. Often, a boolean is all we need.
  16. const bools = .map(sentence => - )
  17. AL )
  18. // [false, true, false, true]
Advertisement
Add Comment
Please, Sign In to add comment