Hey, you can edit this post here, I am sure many other analogies between Perl and JavaScript can be added to this list.
use strict
Both are mot strict by default, by the way the syntax to turn on strict mode is exactly the same.
| Perl |
JavaScript |
use strict; |
"use strict;" |
Ubiquitous
Perl is everywhere server side, JavaScript is everywhere client side.
Version 6
Both had their popular version 5 with an amazing version 6.
Data structures
Syntax for arrays and objects is the same.
and now with ES6 also JavaScript has trailing commas, I mean
{
foo: 1,
bar: 2, // <-- comma allowed here, finally I can use ddkp vim command to swap lines (:
}
Misc
Perl vs JavaScript both misunderstood or underestimated by masses.
Perl has a symbol table, now with ES6 also JavaScript has Symbol (this is just coincidence).
Handcrafted Object oriented system.
… more stuff will be added.