Saturday 16 February 2019

How to Fix JavaScript HTML Element Did Not Show an Error?



TypeScript code is as follows:



namespacesLab.ts:



var ArrayUtilities;
(function (ArrayUtilities) {
function reverseArray(array) {
return array.slice(0).reverse();
}
ArrayUtilities.reverseArray = reverseArray;
function lastItemOfArray(array) {
return array.slice(0).pop();
}
ArrayUtilities.lastItemOfArray = lastItemOfArray;
function firstItemOfArray(array) {
return array.slice(0).shift();
}
ArrayUtilities.firstItemOfArray = firstItemOfArray;
function concatenateArray(array1, array2) {
return array1.concat(array2);
}
ArrayUtilities.concatenateArray = concatenateArray;
})(ArrayUtilities || (ArrayUtilities = {}));


HTML code is as follows:



index.html:

















When I click the index.html, a webpage showing four buttons appears. However, there is no array displayed.



expected result: four buttons and an array shown on the webpage



actual result: the array did not show on the webpage


Answer



you have a space in your ID:



change






to





No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...