Skip to content

Dateクラスの演習を書き換えました #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 6, 2024

Conversation

kiyokaanan
Copy link
Contributor

No description provided.

@kiyokaanan kiyokaanan requested review from chvmvd and nakaterm May 4, 2024 08:32
Copy link

cloudflare-workers-and-pages bot commented May 4, 2024

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

Latest commit: e15cafc
Status: ✅  Deploy successful!
Preview URL: https://848f98c2.utcode-learn.pages.dev
Branch Preview URL: https://class-exercise-change.utcode-learn.pages.dev

View logs

@@ -5,7 +5,7 @@
<title>カウントダウン</title>
</head>
<body>
<div id="countdown-box"></div>
<div id="crrent-time"></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u抜けてますね。

@@ -282,7 +282,7 @@ tanaka.introduceSelf(); // 私の名前は田中です。18歳です。ドイツ

`Student` クラスを継承して `SeniorStudent` クラスを作ってみましょう。`SeniorStudent` クラスのインスタンスは `researchQuestion` プロパティを持ち、`introduceSelf` メソッドを実行すると自分の名前を出力した後に自分の研究内容を紹介するようにしてみましょう。

<Answer title="学生のClassの定義">
<Answer title="先輩学生の自己紹介">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先輩というより高学年?じゃないでしょうか。

@@ -342,7 +342,7 @@ document.write(myBirthDay.getFullYear()); // 2014
{/* TODO: 自分はこっちのほうがいいと思いますが...
例えば [`Map` クラス](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Map)は、キーと値のペアを保存するオブジェクトを提供します。

```js
```javascript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コンフリクトしそうです。解決頑張ってください。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今なんかありましたっけ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここのコメントを別ブランチで @kiyokaanan さんが消してました。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そこか。

@@ -0,0 +1,15 @@
const CurrentTime = document.getElementById("current-time");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CurrentTime でなくて、currentTime かな。キャメルケースで。

```

と表示する
[`Date` クラス](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Date)を使って、現在時刻を表示してみましょう。[`Date` クラス](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Date)のドキュメントを読んで、現在時刻を表示するのに必要なメソッドを探してみましょう。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

リンクつけるのは最初の1回だけで良さそう。

return `今は${currentYear}年${currentMonth}月${currentDate}日${currentHour}時${currentMinute}分${currentSecond}秒です。`;
}

CurrentTime.textContent = getCurrentTime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここも。

Copy link
Contributor

@aster-void aster-void left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -2,10 +2,10 @@
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>カウントダウン</title>
<title>現在時刻</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

細かいこと言うとここら辺を他と合わせて「〇〇の解答例」としたかったりします。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これに関しては全体として方針をちゃんと決めていないのと、僕は逆にこのままの方が良いと思っているので一旦放置で良いんじゃないでしょうか。

Copy link
Contributor

@chvmvd chvmvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kiyokaanan kiyokaanan merged commit 9d1898f into master May 6, 2024
@kiyokaanan kiyokaanan deleted the class-exercise-change branch May 6, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants