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


Groups > comp.lang.javascript > #25437 > unrolled thread

I need help with the following code.

Started byIria Vasquez-Paez <iriavp@gmail.com>
First post2014-07-18 09:39 -0700
Last post2014-07-18 21:12 +0000
Articles 20 on this page of 39 — 10 participants

Back to article view | Back to comp.lang.javascript


Contents

  I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 09:39 -0700
    Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-18 18:07 +0100
    Re: I need help with the following code. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-18 19:14 +0200
      Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 10:28 -0700
        Re: I need help with the following code. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-18 19:51 +0200
          Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 11:24 -0700
            Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-18 20:06 +0100
              Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 12:27 -0700
                Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 12:47 -0700
                Re: I need help with the following code. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-18 21:30 +0100
                  Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 14:41 -0700
                    Re: I need help with the following code. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-18 23:28 +0100
                      Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 16:54 -0700
                        Re: I need help with the following code. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-19 01:57 +0100
                          Re: I need help with the following code. Mike Duffy <md_002@videotron.ca> - 2014-07-18 21:29 -0400
                            Re: I need help with the following code. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-19 03:00 +0100
                            Re: I need help with the following code. Gene Wirchenko <genew@telus.net> - 2014-07-21 10:23 -0700
                        Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-19 09:11 +0100
                Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-18 21:33 +0100
            Re: I need help with the following code. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-18 22:06 +0200
    Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 10:23 -0700
      Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-18 18:27 +0100
    Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-18 22:04 +0200
      Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-18 22:53 +0200
        Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-18 22:56 +0200
        Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-18 22:08 +0100
          Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-18 23:37 +0200
            Re: I need help with the following code. John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-20 10:50 +0100
              Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-20 20:56 +0200
                Re: I need help with the following code. Tim Streater <timstreater@greenbee.net> - 2014-07-20 22:40 +0100
                  Re: I need help with the following code. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-21 07:41 +0200
                Re: I need help with the following code. Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-21 11:49 -0700
                  Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-22 13:58 +0200
                    Re: I need help with the following code. Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-22 07:45 -0700
                      Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-22 21:54 +0200
        Re: I need help with the following code. Iria Vasquez-Paez <iriavp@gmail.com> - 2014-07-18 14:42 -0700
          Re: I need help with the following code. danca <cyberdanny@tiscalinet.it> - 2014-07-19 00:00 +0200
            Re: I need help with the following code. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-18 23:42 +0100
    Re: I need help with the following code. Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-18 21:12 +0000

Page 1 of 2  [1] 2  Next page →


#25437 — I need help with the following code.

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 09:39 -0700
SubjectI need help with the following code.
Message-ID<cb3a7a8c-b4b5-4cce-8184-ebfdaf9a9d8b@googlegroups.com>
This is the code as it starts on Code Academy.com. I'd greatly appreciate help on this. 

var bool = true;

while(bool === true){
    console.log("Less is more!");
    bool = false;
}


You have to remove the equals signs. 

var bool = true;

while(bool = true){
    console.log("Less is more!");
    bool = false;
}


This is my solution that does't pass the editor. 


var bool = true;
while(bool) {
console.log ("Less is more!";
bool = false;
}


This solution is a problem with syntax. Other solutions cause my browser to crash. I need to solve this headache in order to move on. I have gone ahead but I am not progressing with this problem. I really need a solution. The above solution is a syntax problem. Thanks. 


Iria

[toc] | [next] | [standalone]


#25439

FromTim Streater <timstreater@greenbee.net>
Date2014-07-18 18:07 +0100
Message-ID<180720141807596839%timstreater@greenbee.net>
In reply to#25437
In article <cb3a7a8c-b4b5-4cce-8184-ebfdaf9a9d8b@googlegroups.com>,
Iria Vasquez-Paez <iriavp@gmail.com> wrote:

> This is the code as it starts on Code Academy.com. I'd greatly appreciate
> help on this. 
> 
> var bool = true;
> 
> while(bool === true){
>     console.log("Less is more!");
>     bool = false;
> }
> 
> 
> You have to remove the equals signs. 
> 
> var bool = true;
> 
> while(bool = true){
>     console.log("Less is more!");
>     bool = false;
> }
> 
> 
> This is my solution that does't pass the editor. 
> 
> 
> var bool = true;
> while(bool) {
> console.log ("Less is more!";
> bool = false;
> }
> 
> 
> This solution is a problem with syntax. Other solutions cause my browser to
> crash. I need to solve this headache in order to move on. I have gone ahead
> but I am not progressing with this problem. I really need a solution. The
> above solution is a syntax problem. Thanks. 

Reading this I am puzzled as to what question you are asking. You have
3 sets of code, although it is unclear what problem has been set and by
whom.

First set of code looks like it will put one line of output to the
console, and could in fact be simplified down to one statement - the
console.log statement.

Second set of code looks like it will likely loop for ever, as you are
setting bool to true at the top of the while.

Third set will give a syntax error because you're missing a closing
paren after the double-quote.

What I've written may or may not be relevant or even true as I've not
run any of the code examples. But then you've not specified your
problem or what you're trying to do.

-- 
"I am enclosing two tickets to the first night of my new play; bring a
friend.... if you have one." - GB Shaw to Churchill "Cannot possibly
attend first night, will attend second...  if there is one." - Winston
Churchill, in response.

[toc] | [prev] | [next] | [standalone]


#25440

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-18 19:14 +0200
Message-ID<XnsA36EC3A863756eejj99@194.109.133.133>
In reply to#25437
Iria Vasquez-Paez <iriavp@gmail.com> wrote on 18 jul 2014 in
comp.lang.javascript: 

> This is the code as it starts on Code Academy.com. I'd greatly
> appreciate help on this. 
> 
> var bool = true;
> 
> while(bool === true){
>     console.log("Less is more!");
>     bool = false;
>}

This is nonsense code as it can be reduced to

var bool = true;
console.log("Less is more!");
bool = false;

which can be reduced to:

var bool = false;
console.log("Less is more!");

> You have to remove the equals signs. 

Why? [I don't take commands from strangers.]

> var bool = true;
> 
> while(bool = true){
>     console.log("Less is more!");
>     bool = false;
>}

same result, can be reduced to:

var bool = false;
console.log("Less is more!");

> This is my solution that does't pass the editor. 

You probably mean something else than an editor, 
as an editor just edits a textfile and passes all texts.

> var bool = true;
> while(bool) {
> console.log ("Less is more!";
> bool = false;
>}

missing closing ")" in line 3, should be:

console.log ("Less is more!");

> This solution is a problem with syntax. 

It is not a solution, 
as solution means your problem is gone.

> Other solutions cause my browser to crash. 

Undoubtedly you can make other syntax mistakes, 
and mistakenly call tham a solution.

But I doubt syntax errors in JS crash a modern browser, 
probably it just freezes them when you make a endless loop,
and should warn you after a timeout.

But there always are countless "other solutions" that are not syntax errors.

> I need to solve this headache in order to move on. 

Paracetamol?

> I have gone ahead but I am not progressing with this problem. 

Impossible as "progressing" and "going ahead" just mean the same.

> I really need a
> solution. The above solution is a syntax problem. Thanks

You don't ask for anything here, so why the "thanks"?

A syntax error is not a solution.

You don't even tell what you want your code to do,
and your examples do nothing.

Perhaps, dear Iria, you could restart and tell us 
what you want your code to do.

Or is it your teacher giving you homework?

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#25443

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 10:28 -0700
Message-ID<4fcfff57-3b7e-47fe-bc56-f006d847d652@googlegroups.com>
In reply to#25440
On Friday, July 18, 2014 10:14:02 AM UTC-7, Evertjan. wrote:
> Iria Vasquez-Paez <iriavp@gmail.com> wrote on 18 jul 2014 in
> 
> comp.lang.javascript: 
> 
> 
> 
> > This is the code as it starts on Code Academy.com. I'd greatly
> 
> > appreciate help on this. 
> 
> > 
> 
> > var bool = true;
> 
> > 
> 
> > while(bool === true){
> 
> >     console.log("Less is more!");
> 
> >     bool = false;
> 
> >}
> 
> 
> 
> This is nonsense code as it can be reduced to
> 
> 
> 
> var bool = true;
> 
> console.log("Less is more!");
> 
> bool = false;
> 
> 
> 
> which can be reduced to:
> 
> 
> 
> var bool = false;
> 
> console.log("Less is more!");
> 
> 
> 
> > You have to remove the equals signs. 
> 
> 
> 
> Why? [I don't take commands from strangers.]
> 
> 
> 
> > var bool = true;
> 
> > 
> 
> > while(bool = true){
> 
> >     console.log("Less is more!");
> 
> >     bool = false;
> 
> >}
> 
> 
> 
> same result, can be reduced to:
> 
> 
> 
> var bool = false;
> 
> console.log("Less is more!");
> 
> 
> 
> > This is my solution that does't pass the editor. 
> 
> 
> 
> You probably mean something else than an editor, 
> 
> as an editor just edits a textfile and passes all texts.
> 
> 
> 
> > var bool = true;
> 
> > while(bool) {
> 
> > console.log ("Less is more!";
> 
> > bool = false;
> 
> >}
> 
> 
> 
> missing closing ")" in line 3, should be:
> 
> 
> 
> console.log ("Less is more!");
> 
> 
> 
> > This solution is a problem with syntax. 
> 
> 
> 
> It is not a solution, 
> 
> as solution means your problem is gone.
> 
> 
> 
> > Other solutions cause my browser to crash. 
> 
> 
> 
> Undoubtedly you can make other syntax mistakes, 
> 
> and mistakenly call tham a solution.
> 
> 
> 
> But I doubt syntax errors in JS crash a modern browser, 
> 
> probably it just freezes them when you make a endless loop,
> 
> and should warn you after a timeout.
> 
> 
> 
> But there always are countless "other solutions" that are not syntax errors.
> 
> 
> 
> > I need to solve this headache in order to move on. 
> 
> 
> 
> Paracetamol?
> 
> 
> 
> > I have gone ahead but I am not progressing with this problem. 
> 
> 
> 
> Impossible as "progressing" and "going ahead" just mean the same.
> 
> 
> 
> > I really need a
> 
> > solution. The above solution is a syntax problem. Thanks
> 
> 
> 
> You don't ask for anything here, so why the "thanks"?
> 
> 
> 
> A syntax error is not a solution.
> 
> 
> 
> You don't even tell what you want your code to do,
> 
> and your examples do nothing.
> 
> 
> 
> Perhaps, dear Iria, you could restart and tell us 
> 
> what you want your code to do.
> 
> 
> 
> Or is it your teacher giving you homework?
> 
> 
> 
> -- 
> 
> Evertjan.
> 
> The Netherlands.
> 
> (Please change the x'es to dots in my emailaddress)




Evertjan, I need a solution. 


Here is the question from Code Academy.com. I really should have posted it earlier. 

Brevity is the soul of programming
You may have noticed that when we give a variable the boolean value true, we check that variable directly--we don't bother with ===. For instance,

var bool = true;
while(bool){
    //Do something
}
is the same thing as

var bool = true;
while(bool === true){
    //Do something
}
but the first one is faster to type. Get in the habit of typing exactly as much as you need to, and no more!

If you happen to be using numbers, as we did earlier, you could even do:

var myNumber = 1;
while(myNumber) {
    // Do something!
}
Instructions
We've written the less succinct version in the editor. Correct it to the more elegant version!

?
Stuck? Get a hint!
Your condition Your condition should only be:

while(bool)





Do the instructions make more sense to everybody now that I've posted it? Thanks for the responses so far. I am asking for a full-blown solution. Yes I know I have an infinite loop. The question is how to resolve the infinite loop. Thanks, 



Iria

[toc] | [prev] | [next] | [standalone]


#25444

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-18 19:51 +0200
Message-ID<XnsA36ECA0CCD17Deejj99@194.109.133.133>
In reply to#25443
Iria Vasquez-Paez <iriavp@gmail.com> wrote on 18 jul 2014 in
comp.lang.javascript: 

> Evertjan, I need a solution. 

Shall we say you "want" a solution?

> Here is the question from Code Academy.com. I really should have posted
> it earlier. 
> 
> Brevity is the soul of programming
> You may have noticed that when we give a variable the boolean value
> true, we check that variable directly--we don't bother with ===. For
> instance, 
> 
> var bool = true;
> while(bool){
>     //Do something
>}
> is the same thing as
> 
> var bool = true;
> while(bool === true){
>     //Do something
>}
> but the first one is faster to type. Get in the habit of typing exactly
> as much as you need to, and no more! 

Well, that may or may not be a good advice. Syntax is not only typing 
brevity, but also readability, beauty of the text, and even processor speed.

> If you happen to be using numbers, as we did earlier, you could even do:
> 
> var myNumber = 1;
> while(myNumber) {
>     // Do something!
>}
> Instructions
> We've written the less succinct version in the editor. Correct it to the
> more elegant version! 

So?

> Stuck? Get a hint!
> Your condition Your condition should only be:
> 
> while(bool)

so?

> Do the instructions make more sense to everybody now that I've posted
> it? Thanks for the responses so far. 

No question by you yet.

> I am asking for a full-blown
> solution. Yes I know I have an infinite loop. 

Well, I did not see that code. 
We cannot discuss about that you do not show.

Did your browser crash as you said, or not?

> The question is how to resolve the infinite loop. 

Do away with your infinite loop, methinks.

An infinite loop is stupid, but not a syntax error.
Your forgetting a closing ")" however, is a syntax error.

I showed you this solution, 
the full-blown reduction of your code:

===============
var bool = false;
console.log("Less is more!");
===============

You see, a loop that does not look can be thrown out.

========================

The question remains: 
"What do you want your code to do?"

Showing a code that does not do what you want it to do
really needs an explanation of what you want it to do,
otherwise how are we ever to understand what you want?

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#25446

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 11:24 -0700
Message-ID<53f9d880-6794-4ad6-a219-1276e3df41d9@googlegroups.com>
In reply to#25444
On Friday, July 18, 2014 10:51:44 AM UTC-7, Evertjan. wrote:
> Iria Vasquez-Paez <iriavp@gmail.com> wrote on 18 jul 2014 in
> 
> comp.lang.javascript: 
> 
> 
> 
> > Evertjan, I need a solution. 
> 
> 
> 
> Shall we say you "want" a solution?
> 
> 
> 
> > Here is the question from Code Academy.com. I really should have posted
> 
> > it earlier. 
> 
> > 
> 
> > Brevity is the soul of programming
> 
> > You may have noticed that when we give a variable the boolean value
> 
> > true, we check that variable directly--we don't bother with ===. For
> 
> > instance, 
> 
> > 
> 
> > var bool = true;
> 
> > while(bool){
> 
> >     //Do something
> 
> >}
> 
> > is the same thing as
> 
> > 
> 
> > var bool = true;
> 
> > while(bool === true){
> 
> >     //Do something
> 
> >}
> 
> > but the first one is faster to type. Get in the habit of typing exactly
> 
> > as much as you need to, and no more! 
> 
> 
> 
> Well, that may or may not be a good advice. Syntax is not only typing 
> 
> brevity, but also readability, beauty of the text, and even processor speed.
> 
> 
> 
> > If you happen to be using numbers, as we did earlier, you could even do:
> 
> > 
> 
> > var myNumber = 1;
> 
> > while(myNumber) {
> 
> >     // Do something!
> 
> >}
> 
> > Instructions
> 
> > We've written the less succinct version in the editor. Correct it to the
> 
> > more elegant version! 
> 
> 
> 
> So?
> 
> 
> 
> > Stuck? Get a hint!
> 
> > Your condition Your condition should only be:
> 
> > 
> 
> > while(bool)
> 
> 
> 
> so?
> 
> 
> 
> > Do the instructions make more sense to everybody now that I've posted
> 
> > it? Thanks for the responses so far. 
> 
> 
> 
> No question by you yet.
> 
> 
> 
> > I am asking for a full-blown
> 
> > solution. Yes I know I have an infinite loop. 
> 
> 
> 
> Well, I did not see that code. 
> 
> We cannot discuss about that you do not show.
> 
> 
> 
> Did your browser crash as you said, or not?
> 
> 
> 
> > The question is how to resolve the infinite loop. 
> 
> 
> 
> Do away with your infinite loop, methinks.
> 
> 
> 
> An infinite loop is stupid, but not a syntax error.
> 
> Your forgetting a closing ")" however, is a syntax error.
> 
> 
> 
> I showed you this solution, 
> 
> the full-blown reduction of your code:
> 
> 
> 
> ===============
> 
> var bool = false;
> 
> console.log("Less is more!");
> 
> ===============
> 
> 
> 
> You see, a loop that does not look can be thrown out.
> 
> 
> 
> ========================
> 
> 
> 
> The question remains: 
> 
> "What do you want your code to do?"
> 
> 
> 
> Showing a code that does not do what you want it to do
> 
> really needs an explanation of what you want it to do,
> 
> otherwise how are we ever to understand what you want?
> 
> 
> 
> -- 
> 
> Evertjan.
> 
> The Netherlands.
> 
> (Please change the x'es to dots in my emailaddress)




Thanks but that solution, however matching in brevity, doesn't work in the editor. I have to ask myself what's going on with that. It's like the editor is stuck in an infinite loop. When I leave the equals signs in, it seems to work again. But it says to remove the equals signs. So I remove the equals signs and it manages to freeze up again. I have no idea anymore, really.

[toc] | [prev] | [next] | [standalone]


#25448

FromTim Streater <timstreater@greenbee.net>
Date2014-07-18 20:06 +0100
Message-ID<180720142006353796%timstreater@greenbee.net>
In reply to#25446
In article <53f9d880-6794-4ad6-a219-1276e3df41d9@googlegroups.com>,
Iria Vasquez-Paez <iriavp@gmail.com> wrote:

> On Friday, July 18, 2014 10:51:44 AM UTC-7, Evertjan. wrote:

> > The question remains: 
> > 
> > "What do you want your code to do?"

> Thanks but that solution, however matching in brevity, doesn't work in the
> editor.

What editor? And what does an editor have to do with anything? Your
javascript is executed by a *browser*. Which one are you using?

-- 
"Once you adopt the unix paradigm, the variants cease to be a problem - you
bitch, of course, but that's because bitching is fun, unlike M$ OS's, where 
bitching is required to keep your head from exploding." - S Stremler in afc

[toc] | [prev] | [next] | [standalone]


#25449

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 12:27 -0700
Message-ID<98e6072b-a63c-42fb-aee6-e7524483c4f0@googlegroups.com>
In reply to#25448
On Friday, July 18, 2014 12:06:35 PM UTC-7, Tim Streater wrote:
> In article <53f9d880-6794-4ad6-a219-1276e3df41d9@googlegroups.com>,
> 
> Iria Vasquez-Paez <iriavp@gmail.com> wrote:
> 
> 
> 
> > On Friday, July 18, 2014 10:51:44 AM UTC-7, Evertjan. wrote:
> 
> 
> 
> > > The question remains: 
> 
> > > 
> 
> > > "What do you want your code to do?"
> 
> 
> 
> > Thanks but that solution, however matching in brevity, doesn't work in the
> 
> > editor.
> 
> 
> 
> What editor? And what does an editor have to do with anything? Your
> 
> javascript is executed by a *browser*. Which one are you using?
> 
> 
> 
> -- 
> 
> "Once you adopt the unix paradigm, the variants cease to be a problem - you
> 
> bitch, of course, but that's because bitching is fun, unlike M$ OS's, where 
> 
> bitching is required to keep your head from exploding." - S Stremler in afc

My browser is Chrome. No solution I have tried is working. I have tried many solutions. I have no idea what will work yet. 


According to the website this is the solution: 

var bool = true;

while(bool){
    console.log("Less is more!");
    bool = false;
} 


You want to run a loop saying Less is more and end it. The browser freezes up with any code I write into it. 


Iria 

[toc] | [prev] | [next] | [standalone]


#25451

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 12:47 -0700
Message-ID<a177742e-cb25-42bc-9be2-d2822c91e59a@googlegroups.com>
In reply to#25449
On Friday, July 18, 2014 12:27:49 PM UTC-7, Iria Vasquez-Paez wrote:
> On Friday, July 18, 2014 12:06:35 PM UTC-7, Tim Streater wrote:
> 
> > In article <53f9d880-6794-4ad6-a219-1276e3df41d9@googlegroups.com>,
> 
> > 
> 
> > Iria Vasquez-Paez <iriavp@gmail.com> wrote:
> 
> > 
> 
> >
> 
> > 
> 
> > > On Friday, July 18, 2014 10:51:44 AM UTC-7, Evertjan. wrote:
> 
> > 
> 
> > 
> 
> > 
> 
> > > > The question remains: 
> 
> > 
> 
> > > > 
> 
> > 
> 
> > > > "What do you want your code to do?"
> 
> > 
> 
> > 
> 
> > 
> 
> > > Thanks but that solution, however matching in brevity, doesn't work in the
> 
> > 
> 
> > > editor.
> 
> > 
> 
> > 
> 
> > 
> 
> > What editor? And what does an editor have to do with anything? Your
> 
> > 
> 
> > javascript is executed by a *browser*. Which one are you using?
> 
> > 
> 
> > 
> 
> > 
> 
> > -- 
> 
> > 
> 
> > "Once you adopt the unix paradigm, the variants cease to be a problem - you
> 
> > 
> 
> > bitch, of course, but that's because bitching is fun, unlike M$ OS's, where 
> 
> > 
> 
> > bitching is required to keep your head from exploding." - S Stremler in afc
> 
> 
> 
> My browser is Chrome. No solution I have tried is working. I have tried many solutions. I have no idea what will work yet. 
> 
> 
> 
> 
> 
> According to the website this is the solution: 
> 
> 
> 
> var bool = true;
> 
> 
> 
> while(bool){
> 
>     console.log("Less is more!");
> 
>     bool = false;
> 
> } 
> 
> 
> 
> 
> 
> You want to run a loop saying Less is more and end it. The browser freezes up with any code I write into it. 
> 
> 
> 
> 
> 
> Iria




Oh yes and when I use the code in Explorer it passes but freezes up so I can't get the point I want. It is one lousy point I'm going after here. The code freezes on all my browsers and I have no idea why that is. Thanks, 


Iria 

[toc] | [prev] | [next] | [standalone]


#25454

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-07-18 21:30 +0100
Message-ID<0.374967bf33469973d654.20140718213056BST.874myes933.fsf@bsb.me.uk>
In reply to#25449
Iria Vasquez-Paez <iriavp@gmail.com> writes:
<snip>
> My browser is Chrome. No solution I have tried is working. I have
> tried many solutions. I have no idea what will work yet.
>
>
> According to the website this is the solution: 
>
> var bool = true;
>
> while(bool){
>     console.log("Less is more!");
>     bool = false;
> } 

All I can say is that I went to do that lesson using Chromium
(essentially Chrome) and there was no problem.  The instructions were to
"write the elegant version" which involved removing the "=== true".

My best guess is that there is some tiny but significant difference
between what you think you are entering, and what you really are
entering.

> You want to run a loop saying Less is more and end it. The browser
> freezes up with any code I write into it.

I'm guessing that's hyperbole, but if not then the situation is more
grave.  Does it freeze up when you enter, say, a string or a single
number?

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#25463

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 14:41 -0700
Message-ID<f75b9f57-87bb-4a59-ac56-13359eaebcb9@googlegroups.com>
In reply to#25454
On Friday, July 18, 2014 1:30:56 PM UTC-7, Ben Bacarisse wrote:
> Iria Vasquez-Paez <iriavp@gmail.com> writes:
> 
> <snip>
> 
> > My browser is Chrome. No solution I have tried is working. I have
> 
> > tried many solutions. I have no idea what will work yet.
> 
> >
> 
> >

> 
> > According to the website this is the solution: 
> 
> >
> 
> > var bool = true;
> 
> >
> 
> > while(bool){
> 
> >     console.log("Less is more!");
> 
> >     bool = false;
> 
> > } 
> 
> 
> 
> All I can say is that I went to do that lesson using Chromium
> 
> (essentially Chrome) and there was no problem.  The instructions were to
> 
> "write the elegant version" which involved removing the "=== true".
> 
> 
> 
> My best guess is that there is some tiny but significant difference
> 
> between what you think you are entering, and what you really are
> 
> entering.
> 
> 
> 
> > You want to run a loop saying Less is more and end it. The browser
> 
> > freezes up with any code I write into it.
> 
> 
> 
> I'm guessing that's hyperbole, but if not then the situation is more
> 
> grave.  Does it freeze up when you enter, say, a string or a single
> 
> number?
> 
> 
> 
> -- 
> 
> Ben.

Ben, it freezes up no matter what I do. If I have a syntax error it doesn't necessarily freeze up. I'm at my wit's end. I am not typing in numbers. No closer to a solution. Thank you very much. 

[toc] | [prev] | [next] | [standalone]


#25466

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-07-18 23:28 +0100
Message-ID<0.654af6776d2050d74fb6.20140718232802BST.87mwc6qp3h.fsf@bsb.me.uk>
In reply to#25463
Iria Vasquez-Paez <iriavp@gmail.com> writes:

> On Friday, July 18, 2014 1:30:56 PM UTC-7, Ben Bacarisse wrote:
>> Iria Vasquez-Paez <iriavp@gmail.com> writes:
<snip>
>> > You want to run a loop saying Less is more and end it. The browser
>> > freezes up with any code I write into it.
>> 
>> I'm guessing that's hyperbole, but if not then the situation is more
>> grave.  Does it freeze up when you enter, say, a string or a single
>> number?
>> 
>
> Ben, it freezes up no matter what I do. If I have a syntax error it
> doesn't necessarily freeze up.

To me, those two statements are contradictory.

> I'm at my wit's end. I am not typing in
> numbers.

Right, but I asked a question to get some more data.  Seriously, try it
and report back.

If a single number works, try just one line with a declaration of
a variable set to false.  Then add while (that_var)
console.log("something"); Then add braces round the
console.log("something");.  Then add that_var = false; in the loop.
Then change the initial setting of the variable to true.  Report when it
first goes wrong.  If it's when you type in a number, I doubt anyone can
help -- something is just broken on your machine or on the site.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#25469

FromIria Vasquez-Paez <iriavp@gmail.com>
Date2014-07-18 16:54 -0700
Message-ID<5a349b04-c584-4277-a21d-b67ab7c7828e@googlegroups.com>
In reply to#25466
On Friday, July 18, 2014 3:28:02 PM UTC-7, Ben Bacarisse wrote:
> Iria Vasquez-Paez <iriavp@gmail.com> writes:
> 
> 
> 
> > On Friday, July 18, 2014 1:30:56 PM UTC-7, Ben Bacarisse wrote:
> 
> >> Iria Vasquez-Paez <iriavp@gmail.com> writes:
> 
> <snip>
> 
> >> > You want to run a loop saying Less is more and end it. The browser
> 
> >> > freezes up with any code I write into it.
> 
> >> 
> 
> >> I'm guessing that's hyperbole, but if not then the situation is more
> 
> >> grave.  Does it freeze up when you enter, say, a string or a single
> 
> >> number?
> 
> >> 
> 
> >
> 
> > Ben, it freezes up no matter what I do. If I have a syntax error it
> 
> > doesn't necessarily freeze up.
> 
> 
> 
> To me, those two statements are contradictory.
> 
> 
> 
> > I'm at my wit's end. I am not typing in
> 
> > numbers.
> 
> 
> 
> Right, but I asked a question to get some more data.  Seriously, try it
> 
> and report back.
> 
> 
> 
> If a single number works, try just one line with a declaration of
> 
> a variable set to false.  Then add while (that_var)
> 
> console.log("something"); Then add braces round the
> 
> console.log("something");.  Then add that_var = false; in the loop.
> 
> Then change the initial setting of the variable to true.  Report when it
> 
> first goes wrong.  If it's when you type in a number, I doubt anyone can
> 
> help -- something is just broken on your machine or on the site.
> 
> 
> 
> -- 
> 
> Ben.

I can try it or I can just download Safari and see if it works on Safari or will it be the same story over and over again? I'm really confused. It is true that something is broken on the website. I tried it on a Mac. It nearly crashed the browser. So it is a problem with the website itself. I will try your method and see what happens. I want to be able to pass this darn problem. I can't move on until I do. I skipped ahead. I was just curious if you guys can help me. Safari might allow it to pass. I posted in the bugs forum to discuss the bug and hope that somebody helps me. The whole summer will be gone before I pass the gosh darn problem anyway. My goal was to get through all of Code Academy this whole summer. I might have to extend it to include the rest of the year. Maybe I won't be able to finish it all in one summer. The most controversial part of Code Academy is that it is free. I think the whole entire website is free. You don't have to pay a red cent to learn. I don't know what's wrong with my machine, I had my Chrome fixed. It was opening on Administrator only. So I blew some cash and got it fixed at the beginning of the month. Thanks. 



Iria

[toc] | [prev] | [next] | [standalone]


#25470

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-07-19 01:57 +0100
Message-ID<0.079db7008e323932ec14.20140719015713BST.8761iuqi6u.fsf@bsb.me.uk>
In reply to#25469
Iria Vasquez-Paez <iriavp@gmail.com> writes:
<snip>
> I can try it or I can just download Safari and see if it works on
> Safari or will it be the same story over and over again? I'm really
> confused. It is true that something is broken on the website. I tried
> it on a Mac. It nearly crashed the browser. So it is a problem with
> the website itself. I will try your method and see what happens. I
> want to be able to pass this darn problem. I can't move on until I
> do. I skipped ahead. I was just curious if you guys can help
> me. Safari might allow it to pass. I posted in the bugs forum to
> discuss the bug and hope that somebody helps me. The whole summer will
> be gone before I pass the gosh darn problem anyway. My goal was to get
> through all of Code Academy this whole summer. I might have to extend
> it to include the rest of the year. Maybe I won't be able to finish it
> all in one summer. The most controversial part of Code Academy is that
> it is free. I think the whole entire website is free. You don't have
> to pay a red cent to learn. I don't know what's wrong with my machine,
> I had my Chrome fixed. It was opening on Administrator only. So I blew
> some cash and got it fixed at the beginning of the month. Thanks.

The very best advice I can give you is to stop right now.  Put this
problem out of your mind for 24hours.  One day without JS will not make
a jot of difference to your life.  Go for a walk with the dog.  Read a
book in the park.  Cook a Malaysian prawn curry.  Whatever time you
would have spend on this -- spend it on something else.  The next day
you can try again with a clear head and a clam outlook.  The above reads
as if you are seriously stressed and no one can think in that state.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#25471

FromMike Duffy <md_002@videotron.ca>
Date2014-07-18 21:29 -0400
Message-ID<td0qy7z2zl5s$.n4ln7fj71d14.dlg@40tude.net>
In reply to#25470
On Sat, 19 Jul 2014 01:57:13 +0100, Ben Bacarisse wrote:

> [...]  Cook a Malaysian prawn curry.
> [...]  The next day you can try again with a [...] clam outlook.

And the next day, perhaps a cuttlefish viewpoint,
followed by a periwinkle perspective or a marlin attitude. 

-- 
http://pages.videotron.ca/duffym/index.htm

[toc] | [prev] | [next] | [standalone]


#25472

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-07-19 03:00 +0100
Message-ID<0.be93f0863d7ea25f3343.20140719030004BST.87zjg6p0pn.fsf@bsb.me.uk>
In reply to#25471
Mike Duffy <md_002@videotron.ca> writes:

> On Sat, 19 Jul 2014 01:57:13 +0100, Ben Bacarisse wrote:
>
>> [...]  Cook a Malaysian prawn curry.
>> [...]  The next day you can try again with a [...] clam outlook.
>
> And the next day, perhaps a cuttlefish viewpoint,
> followed by a periwinkle perspective or a marlin attitude. 

:-)

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#25498

FromGene Wirchenko <genew@telus.net>
Date2014-07-21 10:23 -0700
Message-ID<d3jqs95hvm084gpa9brbdh6bg0lltfqrua@4ax.com>
In reply to#25471
On Fri, 18 Jul 2014 21:29:01 -0400, Mike Duffy <md_002@videotron.ca>
wrote:

>On Sat, 19 Jul 2014 01:57:13 +0100, Ben Bacarisse wrote:
>
>> [...]  Cook a Malaysian prawn curry.
>> [...]  The next day you can try again with a [...] clam outlook.
>
>And the next day, perhaps a cuttlefish viewpoint,
>followed by a periwinkle perspective or a marlin attitude. 

     Oh, you typo shark!

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#25473

FromTim Streater <timstreater@greenbee.net>
Date2014-07-19 09:11 +0100
Message-ID<190720140911239131%timstreater@greenbee.net>
In reply to#25469
In article <5a349b04-c584-4277-a21d-b67ab7c7828e@googlegroups.com>,
Iria Vasquez-Paez <iriavp@gmail.com> wrote:

> I can try it or I can just download Safari and see if it works on Safari or
> will it be the same story over and over again? I'm really confused. It is
> true that something is broken on the website.

Don't do your work on the website then. Do it directly in your own
browser. On my Mac, using chrome, I go to the View menu and choose
Developer and then Javascript Console. *That* is where you should be
typing your example code. That's where I did it, and it worked.

> I don't know what's wrong with my machine, I had my Chrome fixed.
> It was opening on Administrator only. So I blew some cash and got
> it fixed at the beginning of the month. Thanks. 

There is almost certainly no bug, and nothing wrong with your machine.

-- 
"If you're not able to ask questions and deal with the answers without feeling 
that someone has called your intelligence or competence into question, don't 
ask questions on Usenet where the answers won't be carefully tailored to avoid
tripping your hair-trigger insecurities."                  - D M Procida, UCSM

[toc] | [prev] | [next] | [standalone]


#25456

FromTim Streater <timstreater@greenbee.net>
Date2014-07-18 21:33 +0100
Message-ID<180720142133558238%timstreater@greenbee.net>
In reply to#25449
In article <98e6072b-a63c-42fb-aee6-e7524483c4f0@googlegroups.com>,
Iria Vasquez-Paez <iriavp@gmail.com> wrote:


> My browser is Chrome. No solution I have tried is working. I have tried many
> solutions. I have no idea what will work yet. 
> 
> According to the website this is the solution: 
> 
> var bool = true;
> 
> while(bool){
>     console.log("Less is more!");
>     bool = false;
> } 
> 
> You want to run a loop saying Less is more and end it.
> The browser freezes up with any code I write into it. 

Well I copy/pasted that into Chrome's console and also Safari's console
(at the > prompt), pressed return and got "Less is more!" as expected.

-- 
"The idea that Bill Gates has appeared like a knight in shining armour to
 lead all customers out of a mire of technological chaos neatly ignores 
 the fact that it was he who, by peddling second-rate technology, led them
 into it in the first place."                             - Douglas Adams

[toc] | [prev] | [next] | [standalone]


#25453

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-18 22:06 +0200
Message-ID<XnsA36EE0DECAA7eejj99@194.109.133.133>
In reply to#25446
Iria Vasquez-Paez <iriavp@gmail.com> wrote on 18 jul 2014 in
comp.lang.javascript: 

> Thanks but that solution, however matching in brevity, doesn't work in
> the editor.

1 I don't know if it was a solution, since you did not tel me the problem in 
the sense of whaat you wanted to achieve.

> I have to ask myself what's going on with that.

Indeed, that is what programming is all about.

> It's like the editor is stuck in an infinite loop. 

Impossible, editors don't loop, they just make and change a textfile.

> When I leave the equals signs in, it seems to work again.

What is "it"?

> But it says to remove the equals signs. 

What is "it"?

> So I remove the equals signs and it manages to freeze up again.

What is "it"?

> I have no idea anymore, really. 

I believe you.

However, until you explain whet you want, you are on your own. 



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web