class Str{ constructor(str){ this['строка'] = str||''; } write(str){ this['строка'] = str; return this; } read(){ return this['строка']; } valueOf(){ return this['строка'].length; } }