๐ ์ฝ๋์คํ
์ด์ธ Toy ์๊ณ ๋ฆฌ์ฆ ์คํฐ๋์
๋๋ค!๐
๐ ์๊ณ ๋ฆฌ์ฆ๋ฟ๋ง ์๋๋ผ ์ฝ์ค ๊ณผ์ ์์ ํ์ํ ์๋ฃ๋ฅผ ์๋ก ๊ณต์ ํฉ๋๋ค! ๐
- ๋ชจ๋ ๊ทธ๋ฃน์๋ค์ด ๋ฐํ๋ฅผ ํฉ๋๋ค.
const Algolithm_study = () => {
let Presenters = ["์ฐ์ฑ๋", "์์ฑ๋", "์ฃผํ๋", "์ํธ๋", "์๊ธฐ๋", "์ ์๋"];
return Presenters.map(el => `Today's Presenter : ${el}`)
}- ์์ ์ด ์์ฑํ ์ฝ๋๊ฐ ์๋๋ผ ๋ค๋ฅธ ์ฌ๋์ด ์์ฑํ ์ฝ๋๋ฅผ ๋ฐํํ๊ณ ์ฌ๋ฌ ๋ฐฉ๋ฉด์์ ์ฝ๋๋ฅผ ๋ถ์ํ๋ ์ค๋ ฅ์ ํค์๋๋ค.
const random_Pr = function (arr) {
let presenters = arr.slice();
for (let i = 0; i < arr.length; i++) {
const whoAreYou = Math.floor(Math.random() * arr.length);
let me = presenters[i];
presenters[i] = presenters[whoAreYou];
presenters[whoAreYou] = me;
}
return presenters;
};
const presenters = ["์ฐ์ฑ๋", "์์ฑ๋", "์ฃผํ๋", "์ํธ๋", "์๊ธฐ๋", "์ ์๋"];
const result = random_Pr(presenters)
const study_Start = [
`์ฐ์ฑ๋ ์ฝ๋=> ${result[0]} ๋น์ฒจ!` ,
`์์ฑ๋ ์ฝ๋=> ${result[1]} ๋น์ฒจ!` ,
`์ฃผํ๋ ์ฝ๋=> ${result[2]} ๋น์ฒจ!` ,
`์ํธ๋ ์ฝ๋=> ${result[3]} ๋น์ฒจ!` ,
`์๊ธฐ๋ ์ฝ๋=> ${result[4]} ๋น์ฒจ!` ,
`์ ์๋ ์ฝ๋=> ${result[5]} ๋น์ฒจ!`
]
console.log(study_Start)- ์คํฐ๋ ๊ทธ๋ฃน์ด ๋๋ ํ์๋ ๋ฐฐ์ด์ , ๋๋์ ์ ๊ธฐ๋กํฉ๋๋ค!
class Review {
constructor(name, date, content) {
this.name = name
this.date = date
this.content = content
}
}
const today_i_learned = new Review ("์ด๋ฆ์ ์ ์ด์ฃผ์ธ์", "๋ ์ง๋ฅผ ์ ์ด์ฃผ์ธ์", "๋ด์ฉ์ ์
๋ ฅํด์ฃผ์ธ์")