Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. What is the function of Extracting String Characters in JavaScript

What is the function of Extracting String Characters in JavaScript

Scheduled Pinned Locked Moved JavaScript
questionjavascript
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11411706
    wrote on last edited by
    #1

    I am brand new to coding of any kind. I am reading W3schools, Javascript String Methods, and one of the functions I don't understand is what is the function/purpose of Extracting String Characters? These two codes are particularly unclear to me charAt() and charCodeAt(). When would they be used?

    Richard DeemingR 1 Reply Last reply
    0
    • U User 11411706

      I am brand new to coding of any kind. I am reading W3schools, Javascript String Methods, and one of the functions I don't understand is what is the function/purpose of Extracting String Characters? These two codes are particularly unclear to me charAt() and charCodeAt(). When would they be used?

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Member 11446034 wrote:

      charAt() and charCodeAt()

      The charAt function[^] returns the character at the specified index. For example, if the string contains "Hello", s.charAt(0) will return "H". The charCodeAt function[^] returns the numeric Unicode value of the character at the given index. For example, if the string contains "Hello", s.charCodeAt(0) will return 72, which is the Unicode value that represents an uppercase "H". List of Unicode characters[^]

      Member 11446034 wrote:

      When would they be used?

      They would be used when you need to extract either a character, or the Unicode value of a character, at a particular index in a string.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      S 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Member 11446034 wrote:

        charAt() and charCodeAt()

        The charAt function[^] returns the character at the specified index. For example, if the string contains "Hello", s.charAt(0) will return "H". The charCodeAt function[^] returns the numeric Unicode value of the character at the given index. For example, if the string contains "Hello", s.charCodeAt(0) will return 72, which is the Unicode value that represents an uppercase "H". List of Unicode characters[^]

        Member 11446034 wrote:

        When would they be used?

        They would be used when you need to extract either a character, or the Unicode value of a character, at a particular index in a string.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        S Offline
        S Offline
        Santosh K Tripathi
        wrote on last edited by
        #3

        good information. :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups