Which of the following methods can be used to access individual characters of a string as if it were an array in JavaScript?
charAt()
slice()
split()
indexOf()
In JavaScript, you can use multiple methods to access individual characters of a string as if it were an array. The charAt() method allows you to retrieve a character at a specific index position. The slice() method returns a portion of a string based on the specified start and end indexes. The split() method splits a string into an array of substrings. These methods can be used to access and manipulate individual characters within a string as if it were an array. The indexOf() method returns the index position of a specified character or substring within a string but does not allow direct access to individual characters.