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" } 

https://jsfiddle.net/nl7ouohv/

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

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -