mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-01 10:48:42 -05:00
24 lines
556 B
JavaScript
24 lines
556 B
JavaScript
/**
|
|
* @fileoverview
|
|
* Object representing a Scratch variable.
|
|
*/
|
|
|
|
class Variable {
|
|
/**
|
|
* @param {!string} name Name of the variable.
|
|
* @param {(string|number)} value Value of the variable.
|
|
* @param {boolean} isCloud Whether the variable is stored in the cloud.
|
|
* @constructor
|
|
*/
|
|
constructor (name, value, isCloud) {
|
|
this.name = name;
|
|
this.value = value;
|
|
this.isCloud = isCloud;
|
|
}
|
|
|
|
toXML () {
|
|
return `<variable type="">${this.name}</variable>`;
|
|
}
|
|
}
|
|
|
|
module.exports = Variable;
|