function example() { var actualLng=new google.maps.Polyline(polylineoptns); }
now the example method i will iterate multiple time .while i am doing this scenarios i have to change the variable name like actualLng1,actualLng2,actualLng3.....
function example(count) { this["actualLng" + i] = 'something ' + i; } for (var i = 0; i < 5; i++) { example(i); } console.log(actualLng0) //something 0 console.log(actualLng1) //something 1 console.log(actualLng2) //something 2 console.log(actualLng3) //something 3
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)