Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get part of string javascript

var str="123 - aaaaa"
var num = str.slice(0,3) //num="123"
var name= str.slice(6) //name="aaaaa"
 
PREVIOUS NEXT
Tagged: #part #string #javascript
ADD COMMENT
Topic
Name
8+2 =