Javascript implementation

indentation