Forum Discussion
Abacus Virtual
Hello heroes
I publish an example of an interaction created with state changes and basic operations with JavaScript. A virtual abacus that can help children to perform operations and develop mathematical thinking.
https://360.articulate.com/review/content/779e7988-764d-4695-bd7c-30a20cde36f6/review
- MariaCSStaff
Hi, Alejandro, and welcome to E-Learning Heroes! ✨
What a fantastic idea and project! Thank you for sharing it with the community!
Nicely done, Alejandro! And thanks for sharing your .story file. I'm looking forward to peeking under the hood on this one.
- AlejandroEmm186Community Member
Thanks, David. I hope you like to see what I achieve with this wonderful tool!
- AlejandroEmm186Community Member
thanks for the welcome
- CraigAgnew-6cdeCommunity Member
Really nice Alejandro. Well done!
- AlejandroEmm186Community Member
Thank you Craig
- TrentTesterCommunity Member
This was interesting.
- PatrickMumbaCommunity Member
Job well done, I believe we live for others. Better we heal the world for the betterment of peace and stability.
- HassanIzharCommunity Member
Here is an example of a virtual abacus written in JavaScript that can perform basic operations:
javascript
Copy code
class Abacus {
constructor() {
this.value = 0;
}add(val) {
this.value += val;
}subtract(val) {
this.value -= val;
}reset() {
this.value = 0;
}getValue() {
return this.value;
}
}const myAbacus = new Abacus();
myAbacus.add(5);
console.log(myAbacus.getValue()); // 5myAbacus.subtract(2);
console.log(myAbacus.getValue()); // 3myAbacus.reset();
console.log(myAbacus.getValue()); // 0
This simple implementation of an abacus uses a class with methods to add, subtract, reset and get the current value of the abacus. This can serve as a starting point for building a more complex and interactive virtual abacus for children to learn and develop their mathematical skills.