Cannot get Practice 03_12 to work.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
Practice 03_12 から始め、index.html、script.js、Backpack.js を調べます。class module がどのように読み込まれるか、またブラウザーコンソールから演習の変数にどのようにアクセスするかに注目してください。Chrome または Edge で atom-live-server を使って問題を再現し、その後、提供されている class structure を壊さずに意図したコンソールアクセスが機能することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
Issue Overview
Scope issue with classes.
Describe your environment
Windows 10 19041, Chrome 88 or Edge, atom 1.55.0, atom-live-server
Steps to Reproduce
Working directly in the file structure provided, I add the following to the empty script.js.
import Backpack from "./Backpack.js";
const mybackpack = new Backpack(
'test',
10,
'red',
10,
26,
26,
false);
console.log('Values of mybackpack', mybackpack)
In the browser console it prints the mybackpack as I expect. But if I then try to access mybackpack.name or anything of mybackpack it returns the following error:
Uncaught ReferenceError: mybackpack is not defined
at <anonymous>:1:1
Expected Behavior
Being able to access mybackpack from the console as in previous chapters.
Current Behavior
mybackpack is not part of the scope.
Possible Solution
Copying the class definition of Backpack into script.js and and removing pointers to Backpack.js (in index.html as well as in script.js) helps.
To be honest, I think the presence of Backpack.js is just confusing for this exercise and not needed to work through the given tasks.
Screenshots / Video
Related Issues
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 4k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LinkedInLearning/javascript-essential-training-2832077 のほかの issue
-
Typo in readme file オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
LinkedInLearning/javascript-essential-training-2832077#98 · リアクション 5 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
LinkedInLearning/javascript-essential-training-2832077#5 · リアクション 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
-
minor one off typo オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
LinkedInLearning/javascript-essential-training-2832077#78 · コメント 1 件 ·
LinkedInLearning/javascript-essential-training-2832077 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
Issue-Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sugarlabs/musicblocks#8924 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled オープンcustomer-eng status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100