Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30664

Re: some logic error on a map function

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: some logic error on a map function
Date 2016-06-16 14:08 +0200
Organization PointedEars Software (PES)
Message-ID <5489482.L0yonRzWca@PointedEars.de> (permalink)
References <e46e5762-3e70-475d-93e7-d4ed92e9d3e7@googlegroups.com> <njtm7u$ug4$1@dont-email.me> <1898608.dsHlmFUGLj@PointedEars.de>

Show all headers | View raw


Thomas 'PointedEars' Lahn wrote:

> Jake Jarvis wrote:
> [Pretty-printed code]

Incompletely, therefore:

>> > // Fill in function body here
>> > var hasBadwords = function (message, index) {
>> >   var words = message.split(" ");
>> >   words.map(function (word,index) {
>> >     if (word == 'window'  || word == 'chair' || word == 'knockings') {
>> >       return true;
>> >     } else {
>> >       return false;}
                        ^
*There* is the first "missing" “}” …

>> >     }
>> >   );
>      ^-- }

… so this insertion is not necessary.

>> >
>     ^-- };

However, this is.

Still, it does not change the fact that the program logic is bogus, as I 
explained before.
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-15 20:23 -0700
  Re: some logic error on a map function Jake Jarvis <pig_in_shoes@yahoo.com> - 2016-06-16 09:58 +0200
    Re: some logic error on a map function "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-06-16 12:47 +0200
    Re: some logic error on a map function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-16 12:55 +0200
      Re: some logic error on a map function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-16 14:08 +0200
      Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-16 11:04 -0700
      Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-16 11:04 -0700
      Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-17 13:30 -0700
      Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-17 13:41 -0700
        Re: some logic error on a map function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-17 23:10 +0200
    Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-17 13:31 -0700
      Re: some logic error on a map function Scott Sauyet <scott@sauyet.com> - 2016-07-03 03:07 +0000
        Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-07-09 11:38 -0700

csiph-web