-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy pathscript.js
More file actions
executable file
·50 lines (44 loc) · 955 Bytes
/
script.js
File metadata and controls
executable file
·50 lines (44 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const updateInvestments = (update) => {
let main = document.querySelector("main"); // main is an element
main.innerHTML = markup(investments);
console.info(update);
};
const investments = {
name: "Apple",
risklevel: "Moderate",
price: 32,
ticker: 'AAPL',
type: 'ETF';
};
const client = {
name: "",
address: "",
email: "",
phone: "";
};
const advisor = {
name: "Elisabeth Noble",
phone: "904-352-6609",
email: "elisabeth@healthylivinginvestments.com";
};
const ETFholdings = {
stock1: "",
stock2: "",
bond1: "",
bond2: "";
};
const markup = (investments) => {
return `
<div>
<h3>${investments.name}</h3>
<ul>
<li>Ticker: ${investments.ticker}</li>
<li>Risk: ${investments.risk}</li>
<li>Price: ${investments.price}</li>
<li>Type: ${investments.type}</li>
</div>
`;
};
const main = document.createElement("main");
main.innerHTML = markup(backpack);
document.body.appendChild(main);