I need assistance on conditionally appending a string based on values from captured DOM elements. When the value is empty, I want to include the special character "¬". However, when I try adding it, I get instead because the special character is not recognized.
Below is the sample code:
var nodeList = foo.childNodes;
var str = "";
for (var i = 0; i < nodeList.length; i++) {
var item = nodeList[i];
str += ((<any>item).wholeText || (<any>item).value || "¬");
}
Can someone provide guidance on properly adding the special character "¬" to achieve the desired outcome? Any input would be appreciated.