2

Is there a way to perform the javascript join function in a observableArray?

In javascript i can do the following:

var a = ["1", "2", "3"];

var p = a.join(',');  

and p would be "1,2,3" but with knockout i cant found a way to do this action?

Phoenix_uy
  • 3,173
  • 9
  • 53
  • 100

1 Answers1

7
var x = ko.observableArray(["1", "2", "3"]);

var p = x().join(',');
Geoff
  • 9,340
  • 7
  • 38
  • 48