Home » HTML » Html miscellaneous » Question
  1. For converting string to array we can use ______________ method.
    1. toLowerCase()
    2. charAt()
    3. charCodeAt()
    4. split()
    5. None of these
Correct Option: A

For converting any string to an array we use split() method. E.g. var tr=”t,o,I,k,l”; tr.split(“,”); tr.split(“|”); tr.split(“ ”); charAt returns a character from the given index, charCodeAt() returns Unicode of character at the given index. toLowerCase() method converts input string into lower case string.



Your comments will be displayed only after manual approval.