last day (15 days later) » 

hey
whoa this is neat
alright so basically
now i got my output as such; ["abc, def, ghi, jkl,", "mno, pqr, stu, vwx,", "yza"]
is there any way i could edit it so it becomes like such ;
["abc => string1, def = string2, ghi = string3, jkl = string4,", "mno = string1, pqr = string2, stu = string3, vwx = string4,", "yza = string1"]
so basically i add the parameters string1, string2, string3 and string4 on my own
but they need to be joined corresponding to the values in the array, so vlaue 1 = string 1 value 2 = string 2 etc
Are the "string1"s, "string2"s from an input of some sort, or do you want them to be hard-coded
hard coded
jsfiddle.net/z7yrep20 Since you want to manipulate the values, have to do it more imperatively - construct an array of arrays, creating a new array when the last one's length is greater than 4. Calculate the string "index" you need, and push it along with the value to the array
let me check it out
03:49
might be able to do it with less code using the regex match solution like in the answer, but it would require iterating over each substring twice again
ahh i get how it works now
alright so what if instead of string 1 string 2 string 3 and string 4
i want it to be something like maybe
value1 = caps value2 = low value3 = string4 value4 = set
something like that
let me check it out sec
Use an array of the keywords, and look up the appropriate one with the index variable jsfiddle.net/z7yrep20/1
got it
it works perfectly
hey thanks so much for your time! really appreciate it! i'm not too good with javascript and/or jquery yet, and i really appreciate this

last day (15 days later) »