mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
checking in docs for github.io page
This commit is contained in:
34
docs/step2-01/exercise/src/index.ts
Normal file
34
docs/step2-01/exercise/src/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
const app = document.getElementById('app');
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.setAttribute('readonly', 'true');
|
||||
app.appendChild(textarea);
|
||||
function log(results: string) {
|
||||
textarea.innerText += results;
|
||||
}
|
||||
|
||||
// Some setup code for exercises
|
||||
const obj1 = {
|
||||
first: 'who',
|
||||
second: 'what',
|
||||
third: 'dunno',
|
||||
left: 'why'
|
||||
};
|
||||
|
||||
const obj2 = {
|
||||
center: 'because',
|
||||
pitcher: 'tomorrow',
|
||||
catcher: 'today'
|
||||
};
|
||||
|
||||
function makePromise() {
|
||||
return Promise.resolve(5);
|
||||
}
|
||||
|
||||
// Do the exercises here, output your results with "log()" function
|
||||
// ...
|
||||
log('hello world');
|
||||
|
||||
(async () => {
|
||||
// Place your code for the async / await exercise here
|
||||
// ...
|
||||
})();
|
||||
Reference in New Issue
Block a user