Privacy & Cookies

This website uses cookies. By continuing to use this site you are agreeing to our use of cookies.
Forum Index

Sections

View

Filter topics in this section

Stats

Threads7,423
Posts59,369
Authors6,765

sort() not function?

Level Discussion > Coding Levels > Coding Level 1 > sort() not function?


    • 4385
    • 16

    0
    so I've done this so far
    Show spoiler
    x = Document.getElementByTagName(textarea)[0].innerHTML; x.split(); x.sort()
    but it has returned sort as not a function
Viewing 9 replies - 1 through 9 (of 9 total)
  • feuerstein
    feuerstein's profile picture

    • 13160
    • 767

    0
    Split returns an array of substrings. Furthermore: The split() method does not change the original string.

    Read the documentation of that functions to understand what you are doing
  • Evil3d11
    Evil3d11's profile picture

    • 4385
    • 16

    0
    okay well I've developed it a bit more I realised my misake with the last code but I still can't submit it fast enough.
  • feuerstein
    feuerstein's profile picture

    • 13160
    • 767

    0
    You should remove that not to spoil too much. You could try to make it inline to be faster
  • Sciacallo
    Sciacallo's profile picture

    • 2710
    • 3

    0
    I think I have a similar problem, my code is easier:
    Code:
    document.getElementsByTagName('textarea')[0].innerHTML.split(',').sort();
    but it seems wrong for the system...am I correct? Have I to set the result to a variable?
  • feuerstein
    feuerstein's profile picture

    • 13160
    • 767

    0
    Re-read the description of the level, you are missing a thing
  • dimooz
    dimooz's profile picture

    • 13160
    • 894

    0
    Maybe you could improve your code by adding a submit method in order to do it automatically (and faster)?
    userbar.png
  • feuerstein
    feuerstein's profile picture

    • 13160
    • 767

    0
    That is not the point he missed one requested thing of the level
  • dimooz
    dimooz's profile picture

    • 13160
    • 894

    0
    Yeah I saw but I thought that could also help.. (I didn't want to give him what's missing here!)
    userbar.png
  • feuerstein
    feuerstein's profile picture

    • 13160
    • 767

    0
    Nice move from a nice guy
Viewing 9 replies - 1 through 9 (of 9 total)
You must be logged in to reply to this topic