Codekata💢
replace / subString / splice
const complexNumberMultiply = (a, b) => {
a = a.replace("i", "");
b = b.replace("i", "");
let array1 = a.split("+");
let array2 = b.split("+");
let front_value = String(
Number(array1[0]) * Number(array2[0]) +
Number(array1[1]) * Number(array2[1]) * -1
);
let back_value = String(
Number(array1[0]) * Number(array2[1]) +
Number(array1[1]) * Number(array2[0])
);
return `${front_value}+${back_value}i`;
};
life cycle
오늘의 CSS🎨
grid & flex
.ProductListMain {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 10px;
grid-auto-rows: minmax(100px, auto);
// display: flex;
// flex-wrap: wrap;
// width: 800px;
}