Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Slice Example

/*Use string concatenation and two slice() methods to print
'JS' from 'JavaScript'.*/

let language = 'JavaScript';
console.log(language.slice(0,1)+language.slice(4,5));

//JS
Source by education.launchcode.org #
 
PREVIOUS NEXT
Tagged: #Slice #Example
ADD COMMENT
Topic
Name
1+5 =