मैं console.log()
का उपयोग कर कई जगह देख सकता हूं। क्या कोई मुझे बता सकता है कि इसका उपयोग क्यों किया जाता है?console.log का उपयोग क्यों किया जाता है? यह क्या करता है?
इस तरह कुछ है,
function createCheckBox(idsToShow) {
for(i = 0 ; i < 15 ; i++) {
console.log(idsToShow.indexOf('main' + i + '|') + ' ' + 'main' + i + '|');
if(idsToShow != '' && idsToShow.indexOf('main' + i + '|') == -1) continue;
checkBoxs += "<li> <input type=\"checkbox\" id=\"main" + i + "\" value=\"Example" + i + "\" name=\"lbl"+ i +"\" /> <label id=\"lbl"+ i +"\">Example" + i + "</label></li>";
ids += 'main' + i + '|'; //is the check box id.
}
}
मुझे कभी-कभी आश्चर्य होता है ... बिना किसी कंसोल के ब्राउज़र के बारे में क्या? कहें फायरबग स्थापित नहीं है। क्या 'console.log' एक त्रुटि है? –
@Tomalak Geretkal - हाँ, उत्पादन कोड में 'console.log' का उपयोग न करें। – Quentin
\ * nods \ * धन्यवाद। –