javascript - how to make string in java script? -
expected output
model = gt-n8000, cordova_version = 3.6.4, os = android
hello trying make 1 string shown below display values not name of values .i not able attribute , = in striing here code
var deviceinfo = '' var deviceinfo = ''; deviceinfo += model = getmodel() + ','; deviceinfo += cordova_version = cordovaversion() + ','; deviceinfo += os = getos(); alert(deviceinfo); function getmodel() { return "gt-n8000" } function cordovaversion() { return "3.6.4" } function getos() { return "android" }
try below code.
var deviceinfo = '' var deviceinfo = ''; deviceinfo += 'model = ' + getmodel() + ','; deviceinfo += 'cordova_version = ' + cordovaversion() + ','; deviceinfo += 'os = ' + getos() + ','; alert(deviceinfo) function getmodel() { return "gt-n8000" } function cordovaversion() { return "3.6.4" } function getos() { return "android" }
Comments
Post a Comment