牟田まい
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## 【第29回】JSPrimer輪読会 ###### tags: `JSPrimer輪読会` - [開催概要](https://hackmd.io/OsL28Q9fS7Wa2alu3gkoaw) - [JSPrimer輪読会 ノートまとめ](https://hackmd.io/@NRLooQz8RrqbPmaSYWZceg/r1S4p-5Ds) ------ ## 2023\-4\-20(木) ### 連絡事項や確認・相談 - ### タイムキーパー - maimu ### 読んだところ - Array.prototype.lengthをアクセッサプロパティで再現する の前まで ### 次回 - Array.prototype.lengthをアクセッサプロパティで再現する から ### 自由に使う共有スペース ### 各自の疑問点や気づき、学んだこと - まっきー - クラス構文と関数オブジェクトのルールが混同しがちなので、「関数オブジェクトだとどうだっただろう?」と比較して理解する必要がありそう - クロージャとクラス構文のちがい:クロージャの方がわかりやすく、クラス構文の方がメソッド共有する分メモリ効率がよい、は押さえておきたい - dawa - クロージャーという書き方もあってクラス構文と比較すると、クラス構文では構文無内で定義したメソッドは、プロトタイプメソッド(クラスの各インスタンスから共有されるメソッド)なのでインスタンス間で共有されるという点でメモリ効率が良い(?) - maimu - 関数は `()` をつけて呼び出せるけれど、クラスはエラーになる - クラスの場合は `new` を実行してオブジェクトを作成する - クラスのメソッドはプロパティのように書けない - NG: `hoge: () => {}` - OK: `hoge() {}` - @fuwa - class構文で定義したクラスは関数として呼び出すことはできない。ただし関数でのクラス表現はOK。ごちゃごちゃになりそう - JSのコンストラクタはRubyのinitializeみたいな感じと雑なイメージで覚えました - @umizaru - HackMD書くの面白いですねこれ -  クラス、関数、メソッドそれぞれに命名規則があることを知れてよかった。 -  個人学習の範囲ではとりあえずクラスはアッパーキャメルケース(UpperCamel)、関数とメソッドはローワーキャメルケース(lowerCamer)で書こうと思う。 -  コンストラクタは任意のオブジェクトを返すようにすべきではない。クラスからはインスタンスが返ってくることが期待されるため。 - @AntiSatori - クラスのメソッドはプロトタイプメソッドとして各インスタンス間で共有されるのでインスタンスを作る毎に新しくメソッドが作成されない。 クラス的なオブジェクトをクロージャーを利用して実装した場合はインスタンスの生成毎に新しくオブジェクトが作られるため、それぞれのインスタンス間でのメソッドの共有が行われない。 - 静的メソッドだけの場合はクラスを使う必要は余りないので、基本的にクラスを使うと嬉しい場面は破壊的変更を行う必要のある場合だけかもしれない。 - ちなみにReactのhooksやvueのcomposition apiはクロージャーで作られてます。 - はるまき - getterはプロパティの参照時、setterはプロパティの代入時に呼び出される。自分で書くときの使い所がまだよく分かっていない。 ### 本日の振り返り(よかった点・次回に向けての改善点・今の気分などなんでもOK) - まっきー - 最近集中してTypeScriptを勉強してて、その表現力の高さに少しずつ面白さを実感中 - ブルーベリー本も勢いで買ったので、輪読会にも顔出してみたい - もちろん自作サービスでも取り入れたいと思っています - maimu - fuwaさんの自作サービスで検索結果に対して、同じジャンルで曲のレコメンドがあると嬉しいなと個人的に思いました。 - Twiceのホニャララを聴いている人は他のアーティストのこの曲もおすすめ的な - ありがとうございます!なるほど、レコメンドならSpotifyのAPIで実装できるかもです - 自作サービスがどんどんシンプルに実装ができることが判明して設計力のなさに泣けてきます😭 - 余計な機能はないに越したことはないけど、技術的にやりたいみないな邪な気持ちが発生・・・ - @fuwa - 最近眼精疲労がやばくてモニターを見るのが辛いです。。 - ブルーライトカット系なんだかんだ効く気がします・・・!(効かない説もありますが) - あ、意外と効くんですね!持っているので試してみます〜 - 自分も使っています~ 車の運転とか伝票チェックとか重なるとやばいので日頃から使うようにしています。 - JSとかTSばかりやっているのでRubyが恋しくなってきました - はるまき - 輪読会中にあれこれなんだっけってなったときにBingAIが教えてくれて助かった。 - fuwaさんのサービス、Spotify視聴とかyoutubeのMVとかすぐに再生できるといいかなと思いました! - ありがとうございます〜!ただAPIの提供元サイトでも、一部の楽曲ではそういったリンクが貼られているものがあるんですよね。。 - dawa - 今オブジェクト指向のボウリングをやっています。initializeとかたくさん出てくるので、RubyとJSで比較ができそうです。 - @AntiSatori - 前回のグループコーチングで自分の体調の悪さとか目標とか話していたらkochiさんが興味を持ってもらって、今日はkochiさんと話の続きを沢山出来て面白かったです - ピアカウンセリングと言うらしい - http://www.chokoen.com/sien-7.html - @umizaru - JSクラスのプラクティスがカオスってますが、処理の手順を日本語で書いて、課題を小さくして進めると良い感じだなぁと思ってます。 - ChatGPTにプラクティスの要件をコピペしてコードを出力してすげーと思う反面、学習にならない以上にやっててなんだか面白くないなぁと思いました。 ## 2023\-4\-21(金) ### 連絡事項や確認・相談 - ### タイムキーパー - maimu ### 読んだところ - 静的メソッドの前まで ### 次回 - 静的メソッド から ### 自由に使う共有スペース ### 各自の疑問点や気づき、学んだこと - まっきー - フィールドを`=`使って初期化する方法のほうがシンプルに書ける気がしたが、`setter`を使えなくなるので注意したい - `#`使ったフィールドのプライベート化は`getter`でも呼び出せなくなるのはへぇーでした - @fuwa - クラスフィールドではthisがそのクラスのインスタンスを参照して、初期値に任意の値を書くことができる - `#`を前につけるとPrivateクラスフィールドを定義できる - maimu - クラスフィールドでもプロパティの初期化が可能 - ただし、クラスフィールド→コンストラクタの順で実行されるため、クラスフィールドで初期化したプロパティにコンストラクタで値を入れると上書きされてしまう - ES2022前まではプライベートクラスは定義できなかった - TypeScriptで補えるということを知らなかったためなるほどとなりました! - dawa - Privateクラスフィールドでは、途中から値が入る場合でもフィールドの宣言が必須。 Privateクラスフィールドを使うことで、クラスを利用する際はgetterとsetterを経由しないと#valueを参照できなくなりました。直接は参照できないが、getterとsetterを経由すればアクセスできる? - ### 本日の振り返り(よかった点・次回に向けての改善点・今の気分などなんでもOK) - まっきー - Reactにプラクティスが変わったのはうれしいけど、卒業までの期間は確実に延びた😭 - maimu - Hotwireを使ってモーダルの実装をしたらVue.jsの半分以下のコード量で実現できて感動・・・ - 大規模なサービスには向かない気がするけど、自作サービスであまりフロントが得意じゃない人には意外に良いかもと思いました! - dawa - ボウリングで更なる大きな変更が必要そうです。prettireの使い方を調べています。 - @fuwa - 本日未明に本棚の上からルーターとモデムが落下してそのままにしてあるのですが、やっぱりインターネットの調子が悪いです〜 - うっかりバイト入れすぎて7連勤が生成されてしまったのでげっそりしてます -

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully