code js like oop