public
Created

regexps are silly

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14
> typeof /x/
'function'
> ['ax','by','cz'].filter(/x/)
TypeError: /x/ is not a function
at Array.filter (native)
at [object Context]:1:18
at Interface.<anonymous> (repl.js:179:22)
at Interface.emit (events.js:64:17)
at Interface._onLine (readline.js:153:10)
at Interface._normalWrite (readline.js:227:10)
at ReadStream.<anonymous> (readline.js:66:12)
at ReadStream.emit (events.js:64:17)
at ReadStream._onReadable (net.js:672:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.