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

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -