Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split 2 arrays javascript

const your_array = ['a','b','c','d','e','f']
const thread1Length = Math.floor(your_array.length/2)
const thread2Length = your_array.length-thread1Length
const thread1 = your_array.slice(0,thread1Length)
const thread2 = your_array.slice(thread1Length,your_array.length)
 
PREVIOUS NEXT
Tagged: #split #arrays #javascript
ADD COMMENT
Topic
Name
7+7 =