AI can only take you so far. 🌟 Start with core skills in JavaScript, HTML, CSS, or Python. 🚀

Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Fuad Ak
    PLUS
    Fuad Ak
    Courses Plus Student 691 Points

    array sorting

    Posted February 4, 2015 1:55pm by Fuad Ak
    Fuad Ak
    Courses Plus Student 691 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    1 Answer

  • MUZ140122 Emmanuel Kavhuru
    MUZ140122 Emmanuel Kavhuru
    5,605 Points

    I don't understand how to create a code that sorts elements by length function.

    Posted February 3, 2015 6:49am by MUZ140122 Emmanuel Kavhuru
    MUZ140122 Emmanuel Kavhuru
    5,605 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

  • Jeff Xu
    Jeff Xu
    10,291 Points

    Javascript's Array.sort() question

    Posted January 23, 2015 7:43am by Jeff Xu
    Jeff Xu
    10,291 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    1 Answer

  • Joe Williams
    Joe Williams
    4,014 Points

    I don't understand why creating a function that subtracts a-b then sorts the numbers in the array.

    Posted December 2, 2014 3:52am by Joe Williams
    Joe Williams
    4,014 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    3 Answers

  • rafael perez
    rafael perez
    4,269 Points

    why we keep using the toString function?

    Posted November 14, 2014 5:11pm by rafael perez
    rafael perez
    4,269 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    1 Answer

  • hakan Gülay
    hakan Gülay
    8,489 Points

    I couldnt understand how it orders

    Posted September 11, 2014 4:52am by hakan Gülay
    hakan Gülay
    8,489 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    3 Answers

  • Wajeeh Hassan Qureshi
    Wajeeh Hassan Qureshi
    8,631 Points

    Comparitive function

    Posted August 16, 2014 7:41am by Wajeeh Hassan Qureshi
    Wajeeh Hassan Qureshi
    8,631 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

  • Martin Argosino
    Martin Argosino
    1,447 Points

    In JavaScript Foundations, I'm stuck on Arrays/Methods-2, Challenge Question 2. Is there somewhere I can get the answer?

    Posted August 12, 2014 10:40pm by Martin Argosino
    Martin Argosino
    1,447 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    3 Answers

  • alexeiklika
    PLUS
    alexeiklika
    Courses Plus Student 2,589 Points

    How do arguments automatically get passed to a function when not manually assigned?

    Posted August 7, 2014 3:21pm by alexeiklika
    alexeiklika
    Courses Plus Student 2,589 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

  • Jerry Liu
    PLUS
    Jerry Liu
    Courses Plus Student 1,233 Points

    How does the sort compare function work?

    Posted July 3, 2014 10:44am by Jerry Liu
    Jerry Liu
    Courses Plus Student 1,233 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

  • Presley Cobb
    Presley Cobb
    9,214 Points

    Methods Part 2

    Posted June 14, 2014 11:37pm by Presley Cobb
    Presley Cobb
    9,214 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

  • orange sky
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points

    return Math.random()-0.5;

    Posted June 6, 2014 9:39am by orange sky
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    3 Answers

  • orange sky
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points

    sorting numbers Ascending, Descending, and equal????

    Posted June 6, 2014 8:56am by orange sky
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    3 Answers

  • orange sky
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points

    sort()

    Posted June 6, 2014 8:23am by orange sky
    .a{fill-rule:evenodd;}techdegree
    orange sky
    Front End Web Development Techdegree Student 4,945 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    7 Answers

  • Andrew Barbier
    Andrew Barbier
    1,980 Points

    Confused

    Posted May 29, 2014 5:00am by Andrew Barbier
    Andrew Barbier
    1,980 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    1 Answer

  • Ireneusz Kopta
    Ireneusz Kopta
    6,212 Points

    Problem

    Posted April 27, 2014 8:19pm by Ireneusz Kopta
    Ireneusz Kopta
    6,212 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    4 Answers

  • Ireneusz Kopta
    Ireneusz Kopta
    6,212 Points

    Problem

    Posted April 27, 2014 8:19pm by Ireneusz Kopta
    Ireneusz Kopta
    6,212 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    3 Answers

  • geoffrey
    geoffrey
    28,736 Points

    sort() method and its function to sort numerically

    Posted March 14, 2014 2:39pm by geoffrey
    geoffrey
    28,736 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

  • Paul Son
    Paul Son
    5,474 Points

    Methods and functions

    Posted February 16, 2014 8:30am by Paul Son
    Paul Son
    5,474 Points
    • JavaScript
    • JavaScript Foundations
    • Arrays
    • Methods: Part 2

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.