my solutions to eloquent javascript 2