DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
how to output only a certain length of a string in javascript
var str = 'Some very long string'; if(str.length > 10) str = str.substring(0,10);
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#output
#length
#string
#javascript
ADD COMMENT
Topic
COMMENT
Name
7+7 =
Submit