simple javascript memory