<aside> 🌿 【ポイント】
http://localhost:3000/edit.html**?uid=5**
window.location.search で、現在のページURLのサーチ情報(?で始まる検索クエリ部分)を参照するhttp://localhost:3000/edit.html**/5**
window.location.pathname で、現在のページURLのパスを参照できる
</aside>/** 検索クエリでidを指定している場合 */
// window.location.search:現在のページURLのサーチ情報(?で始まる検索クエリ部分)を参照する
const uid = window.location.search.split("?uid=")[1];
/** パスにidを指定している場合 */
const uid = window.location.pathname.split("/edit.html/")[1];