Skip to content

CORRECTION: interactive-coffeescript.html AFTER Exercise 35 #28

@pelonpelon

Description

@pelonpelon

in Chrome:

    badWords = ['ape', 'monkey', 'simian', 'gorilla', 'evolution']
--- pattern = new RegExp badWords.join('|'), 'i'
+++ pattern = new RegExp "/" + badWords.join('|') + "/", 'i'
or  pattern = new RegExp '"' + badWords.join('|') + '"', 'i'
    isAcceptable = (text) ->
      !pattern.test text

    show isAcceptable 'Mmmm, grapes.'
    show isAcceptable 'No more of that monkeybusiness, now.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions