Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MrDude21

help in Javascript

This topic is 6127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey u guys, im only 12, so dont laff cuz im stupid, but i have a question in java-script. i wanted to know how i can find the value of the highest number in an array (how many there are) from an array which is made by the .split() method splitting a string of user input. if anybody can help, that wuld be great. thanks a lot! ~Andy

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by MrDude21
hey u guys, im only 12, so dont laff cuz im stupid, but i have a question in java-script. i wanted to know how i can find the value of the highest number in an array (how many there are) from an array which is made by the .split() method splitting a string of user input. if anybody can help, that wuld be great. thanks a lot!

~Andy


Try searching on Web Developers sites instead of on a game programming site.. You might want to try: www.webmonkey.com

"And that''s the bottom line cause I said so!"

Cyberdrek

Resist Windows XP''s Invasive Production Activation Technology!

"gitty up" -- Kramer
/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash

Share this post


Link to post
Share on other sites
MrDude21, arrays in java-script actually use the length property, which counts the number of indexes:

myarray=new Array(5);
myarray.length; //this evaluates to 5

Since arrays are objects, you can expect to use some of the usual object methods, and also properties, as long as those properties are numeric (length is the only one I can think of).



Share this post


Link to post
Share on other sites
cool, thanks u guys. i wuz thinking of using the array.length() but i dint know if it wuld work. next time, ill just try it out first. thanks again! bai

~Andy

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!