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