Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LN N ]
- const blockchainPattern = /blockchain/gi
- // Please note my sarcasm and humor in these, I don't mean any of them.
- const sentences = [
- “"JavaScript isn't a _real_ language.",
- "What if we put it on the blockchain?",
- "The government's hacking our IoT devices, man!",
- "Pretty sure we can fix JavaScript with Blockchain."
- I
- // If we use match, we'll get back either null or an array.
- const matches = .map(sentence => .match( )b
- R L )
- // [null, ["blockchain"], null, ["Blockchain"]]
- // With test, we get a boolean back, making our type signature much
- // simpler. Often, a boolean is all we need.
- const bools = .map(sentence => - )
- AL )
- // [false, true, false, true]
Advertisement
Add Comment
Please, Sign In to add comment