Multiple tabs are opening when passing url through Window.open function

Multiple tabs are opening when passing url through Window.open function

My code is


var result_send_msg_body = send_msg_body.replace(/ /g, "+");
        $('#message').val(result_send_msg_body);
        var mobile_no=$('#send_number').val();

var url=' http://gateway.mytelesom.com/gw/lm/sendsms/?username=abc&password=xyz&from=123& to='+mobile_no+'&msg='+result_send_msg_body;
       
        var costpart = mobile_no.split(",");
        for (var i = 0; i < costpart.length; i++) {
         
          var url=' http://gateway.mytelesom.com/gw/lm/sendsms/?username=test&password=test&from=567&to='+costpart[i]+'&msg='+result_send_msg_body;
        //  alert('message sent');
           window.open(url,'_blank');

Iam passing mobile number in  to and  message in msg

So  when more than one mobile numbers are passed in url
it simply open a new tab for each phone number