Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

function myFunction ( a, b ) { let arr = a.split('') for(let i = arr.length - 3; i > 0; i -= 3) { arr.splice(i, 0, b) } return arr.join(''); }

NAGULAN N answered on August 27, 2022 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • javascript array split chunk
  • javascript split array into chuncks of
  • array,split
  • Separate A String Into Array Elements
  • JavaScript Program to illustrate split() function
  • let b = "10000"; let a = "1"; let arr1 = a.split(""); let arr2 = b.split(""); console.log(arr1) console.log(arr2); let maxArr = arr1.length > arr2.length?arr1:arr2; let k = maxArr.length-1; let i = arr1.length-1; let j = arr2.length-1; let ans = []; let

  • function myFunction ( a, b ) { let arr = a.split('') for(let i = arr.length - 3; i > 0; i -= 3) { arr.splice(i, 0, b) } return arr.join(''); }

    0
    Popularity 1/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Aug 27 2022
    NAGULAN N
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.