Anyone here good with Javascript?

Live forum: http://forum.freeipodguide.com/viewtopic.php?t=24437

Brok3n_Sword

17-10-2005 15:35:03

I'm trying to figure out how to put a condition in a switch statement. I know if it's a string, you simply use
case "blah"
and a number would be
case 394
But how would you put a condition, such as (X > 32)? I've tried everything I can think of, thanks for any help/

goofygarber

17-10-2005 15:37:38

I think you're trying to make too much of javascript... its not exactly the most powerful language; but I'll give it a shot
Do it with varibles...
var x32 = (x>32)
case
x32

Brok3n_Sword

17-10-2005 15:39:09

Oh believe me, I don't like using it, but it's for a intro programming class. Nice try, but I don't think that would work ;)

bballp6699

17-10-2005 15:42:23

Why are they teaching you java script in an intro to programming class?

Brok3n_Sword

17-10-2005 15:46:11

It was supposed to be C++, but something happened with the computers in the lab..blah blah..so we had to do a few things in javascript.

JUNIOR6886

17-10-2005 16:10:14

ghey
frm c++ to java script is quite a drop.... your school should have a class called "intro to booting up a computer" lol

dudeextrem2000

17-10-2005 16:10:30

no clue myself but this might be help ful

http//www.google.com/search?hs=DRd&hl=en&lr=&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=java+coding+help&btnG=Search

Brok3n_Sword

17-10-2005 16:22:21

[quote8c40397024="JUNIOR6886"]ghey
frm c++ to java script is quite a drop.... your school should have a class called "intro to booting up a computer" lol[/quote8c40397024]

Thanks for the helpful post! Your -70 karma says it all...Anyway, thanks for all the attempts of helping everyone else, I'll figure it out.

goofygarber

17-10-2005 16:27:06

Javascript isn't even programming until its shoddily compiled on a client, and cpp is an hierarcy language with an amazingly powerful backbone as well as cross platform compatibility.

There is no comparison whatsoever there, javascript can be associated with web programming but not compiled languages (though it can be compiled, no flame war please)

My karma isn't too great either )

Are you sure you don't mean Java?

Allen626

17-10-2005 16:30:47

That is not java, so it has to be javascript. Javas is a good starting out language, but I do not like the slowness of it. C++ to Javascript is a huge drop though.

Brok3n_Sword

17-10-2005 16:53:22

[quotebbb9f8a661="goofygarber"]Javascript isn't even programming until its shoddily compiled on a client, and cpp is an hierarcy language with an amazingly powerful backbone as well as cross platform compatibility.

There is no comparison whatsoever there, javascript can be associated with web programming but not compiled languages (though it can be compiled, no flame war please)

My karma isn't too great either )

Are you sure you don't mean Java?[/quotebbb9f8a661]

Yes, I know that. But this class also teaches you the development process (flowcharts, algorithms, pseudocode). Some things you learn in javascript are still universal in all languages, such as how to work with variables, how to properly comment your code, modules, functions, looping, etc., etc. I'm not going to argue with you over what should be taught in curriculm I have no control over, but I see where they are coming from. I figured out I can't do it this way anyway for the conditions I need to meet. A switch is only for a single variable, so I need to stick with an if-else structure.

Archon810

17-10-2005 18:10:40

god i hate javascript. to me right now, there's no better language than Perl for what i need. c++ and java are both great too. c# .neturl==http://=http:///url is probably the leader.