0
How to create an array that input: ["abc","ded"] output ["*****","*abc*","*ded*","*****"],input:["a"] output ["***","*a*","***"]
2 Answers
+ 2
Javascript : use push() and unshift() methods do add element at start and end of an array
PHP : use array_push() and array_unshift()
+ 2
Kim ...
What happens if the given array has string of various length as its elements?
For example -> [ "good", day" ]