javascript : String.toCharCodeArray()

 

javascript : String.toCharCodeArray()


Target:

Applicable with String Data Type.


Description :

return array of object {char:character, code:charCode} of string's every characters.



Syntax:

String.toCharCodeArray()


Usase:

  1. "Hello World".toCharCodeArray()
    It return Array [{"char":"H","code":72},{"char":"e","code":101},{"char":"l","code":108},{"char":"l","code":108},{"char":"o","code":111},{"char":" ","code":32},{"char":"W","code":87},{"char":"o","code":111},{"char":"r","code":114},{"char":"l","code":108},{"char":"d","code":100}]


Download MYJS.js

MyJs is a collection of java script extension methods that enhances the JavaScript objects, class object, DOM element, domElementsCollections, Date, String, Number and other data type. 

Include in you project landing page (master page) and it will extends your DOM and JavaScript Objects.

Comments

Popular posts from this blog

javascript : String.right

javascript : String.left

javascript : .nextAll()