This small task will allow us to assess your Javascript prowess and problem reasoning. It should take around 1-2 hours. Click start when you're ready.
Using the basket above & basic CSS selectorsdocument.querySelector('#id')ordocument.querySelector('.class')could you replicate the example schema below.
"basket": {
"currency": "GBP",
"costs": {
"subtotal": "£27.00",
},
"items": [
{
"product": {
"costs": {
subtotal: "£15.00"
},
"name": "Muscle Fit Gym Vest",
"url": "https://www.fakeShop/products/vest-tops/p0024156",
},
"quantity": 1
},
{
"product": {
"costs": {
subtotal: "£6.00"
},
"name": "Orange Shorts",
"url": "https://www.fakeShop/products/shorts/p002152",
},
"quantity": 1
},
{
"product": {
"costs": {
subtotal: "£6.00"
},
"name": "Pink T-Shirt",
"url": "https://www.fakeShop/products/t-shirt/p002442",
},
"quantity": 1
}
]
}
When you are happy with your code could you push it up to a Github Repo and email the link to @ scott.scott@salecycle.comIf you're unfamiliar with GitHub see this guide on creating and pushing to a new branch.