Extenza-Academy / WebDev-100_2021-Q1

24 Lessons, 12 Weeks, Get Started as a Web Developer
2 stars 0 forks source link

2.1.6. Assignment #26

Closed mserykh closed 3 years ago

mserykh commented 3 years ago

Assignment

Data Types Practice

Instructions

Imagine you are building a shopping cart. Write some documentation on the data types that you would need to complete your shopping experience. How did you arrive at your choices?

Rubric

Criteria Exemplary Adequate Needs Improvement
The six data types are listed and explored in detail, documenting their use Four datatypes are explored Two data types are explored
mserykh commented 3 years ago

Shopping cart

Data types

Short description

const price = 457.00;
const productName = "Socks";
const currencyShort = "$";
const currencyName = "dollar";
const isAvailable = true;
const shoppingList = [
{
     productName: productName1,
     price: price1,
     currencyShort: currencyShort1,
     quantity: quantity
},
{
     productName: productName2,
     price: price2,
     currencyShort: currencyShort2,
     quantity: quantity
}
];
dev-experience commented 3 years ago
mserykh commented 3 years ago

@dev-experience I decided not to use BigInt and moved product ID to the Number. Also I added another type: Object.

dev-experience commented 3 years ago
mserykh commented 3 years ago

@dev-experience what do you mean by boring? Can you please explain? And can you please give me a link or hint where I can read more about how to use data types in projects and documentation, how to design applications? And is this really a good task for newbies to programming world?

So, usually it's quite boring:

{ productName: productName, price: price, currencyShort: currencyShort, quantity: quantity, }

dev-experience commented 3 years ago

@mserykh we'll cover everything later. I consider task as done. Feel free to update the answer again.

mserykh commented 3 years ago

@mserykh we'll cover everything later. I consider task as done. Feel free to update the answer again.

@dev-experience I have updated the answer: