> Looks really really ugly and that makes it hard to read for you and other coders.
This point might have been better made if you hadn't intentionally structured it to be as unreadable as possible, and also shoved in a few lines of comments to pad it out and make it look bigger than it needs to be. Not a very honest example at all, considering native JS can be as readable as you want to make it.
> So be kind with your co-workers, use jQuery. Even my 5 year old android can run jQuery without freezing the built-in browser.
My co-workers can read and write native JS with or without jQuery as it is, why is it being _kind_ to avoid writing in the style of the native language?
Expressiveness means you waste less of people's time and mental effort.
$(".enemy").after('<div class="crash">').remove()
Without jQuery:
var enemies = document.querySelectorAll(".enemy")
for (var i = 0; i < enemies.length; i++) {
var div = document.createElement("div");
div.className = "crash";
enemies[i].parentNode.insertBefore(div, enemies[i]);
enemies[i].parentNode.removeChild(enemies[i]);
}
Here the last one is comprehensible but even then, it takes longer for a programmer who just found it to figure out what it is doing; and, caring about other peoples time (and future yours) can be referred as 'kind'.
First off, when using jQuery you are still coding in the native language.
Second, the many debates that have happened on HN it is quite clear there is no set "style" in coding Javascript. My style of coding in the native language may be quite different than your style. Therefore, if you use your style in a verbose manner because you choose to not use jQuery and I use my style in a more concise manner because I am using jQuery, it could be said the more concise method is kinder to someone following behind.
But like all things considered a style, opinions vary.
This point might have been better made if you hadn't intentionally structured it to be as unreadable as possible, and also shoved in a few lines of comments to pad it out and make it look bigger than it needs to be. Not a very honest example at all, considering native JS can be as readable as you want to make it.
> So be kind with your co-workers, use jQuery. Even my 5 year old android can run jQuery without freezing the built-in browser.
My co-workers can read and write native JS with or without jQuery as it is, why is it being _kind_ to avoid writing in the style of the native language?