Comments (3)
Argh, dammnit - my brain was out to lunch when I wrote this one ;-|
So, I have updated the call() description in this article:
So that it hopefully makes more sense as to what it is doing.
I have also updated the description of the bouncing balls in the assessment:
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Adding_bouncing_balls_features
And updated the code examples:
https://github.com/mdn/learning-area/blob/master/javascript/oojs/assessment/main.js
https://github.com/mdn/learning-area/blob/master/javascript/oojs/advanced/oojs-class-inheritance-finished.html
https://github.com/mdn/learning-area/blob/master/javascript/oojs/advanced/oojs-class-inheritance-student.html
So I've kinda gone the opposite way here - removing the need for arguments altogether. I still think this is useful to show how a constructor can create an entire object with just a single line of code, even if the attributes are random rather than user defined.
I guess the best practice would be to have the values taken from the parameters rather than being just random, so the caller could decide to create an object of fixed or random size?
from learning-area.
I've updated the examples and text again, to take the random calls out of the constructor and into the instantiation calls.
from learning-area.
Thanks for the quick response!
122ba2d fixes the issue.
from learning-area.
Related Issues (20)
- Form example looks ugly. HOT 7
- oojs.html example shows HTML0204 lint warning HOT 5
- Learning area
- Left sidebar doesn't show scrollbar at specific font sizes. HOT 1
- html/forms/html-form-structure/payment-form.html STYLING ISSUE HOT 3
- Guides > Tools and testing > Cross browser testing > Handling common HTML and CSS problems (Issue)
- [revise] fix payment form code snippet HOT 1
- [type="number"]
- Test your skills: Advanced HTML text — Task 2, paragraph 2: Copy discrepancy HOT 19
- Error Message is Cut Off at the Top when the Example is at the Bottom of the Browser Window HOT 10
- javascript/introduction-to-js-1/first-splash/number-guessing-game.html line 64 is different than any material covered by the tutorial HOT 3
- Standardize lang attribute usage in HTML tutorial on MDN to 'en-US' or 'en-us' HOT 3
- Auto-generated method stub
- Auto-generated method stub
- Width capped at 90% and height capped at 160px in javascript/building-blocks/tasks/styles.css HOT 3
- Label is covered by Text Area in learning-area/html/forms/your-first-HTML-form/first-form-styled.html
- My first issue HOT 1
- new day
- Site
- Where are my divs? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learning-area.