Search
 
SCRIPT & CODE EXAMPLE
 

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"
Comment

PREVIOUS NEXT
Code Example
Javascript :: regex min length max length 
Javascript :: react native text truncate 
Javascript :: .style.display 
Javascript :: how to reset auto numeric js for input 
Javascript :: js to json 
Javascript :: nodejs check if variable is undefined 
Javascript :: javascript canvas dot 
Javascript :: how to add an image using jquery 
Javascript :: console log returns object object 
Javascript :: js array intersection object 
Javascript :: onclick string 
Javascript :: get image url in react input file or preview form image 
Javascript :: injected stylesheet remove 
Javascript :: Uncaught ReferenceError: function is not defined at HTMLUnknownElement.onclick 
Javascript :: how to pass token in laravel in jquery ajax 
Javascript :: check if number is negative javascript 
Javascript :: vuejs send required props to dynamic component 
Javascript :: javascript redirect page 
Javascript :: redirect the page in javascript 
Javascript :: js object contain key 
Javascript :: js test if i am in iframe 
Javascript :: js is number 
Javascript :: regex match to first instance 
Javascript :: javascript copy an array 
Javascript :: check if string is valid date 
Javascript :: check if not checked vanila js 
Javascript :: react native class component constructor 
Javascript :: javascript get local storage 
Javascript :: Clear Cell Value In Google Sheet By App Scripts 
Javascript :: linking javascript to Flask html 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =