Which is the smallest chess engine with ELO at least 2000? Preferably written in javascript, but the language really doesn't matter.
I'm not aware of any "small" chess engine written in JavaScript, but there's a "small" engine written in C. Micro-max has about 1900 to 2000 rating, depends on the rating list and testing condition.

http://www.computerchess.org.uk/ccrl/4040/cgi/engine_details.cgi?print=Details+%28text%29&amp;eng=Micro-Max%204.8

Note that it's not the smallest engine, but the engine that is even smaller than Micro-max plays awful chess (dropping pieces) and even walk into check (illegal move).