James Long
RVA.js, Oct 2013
Taking a pulse of Richmond's tech scene
JavaScript is the language of the web, and more.
Just like Ruby is not Rails and Python is not Django,
JavaScript is not jQuery.
In fact, it's so much more than that.
In 1996, JavaScript given to ECMA for standardization under the name ECMAScript
Trivia time. ECMA also standardizes:
Powers millions of websites
4 extremely advanced and competitive implementations (JIT-able engines)
Diverse, rich culture
Haters gonna hate
(we could have been stuck with VBScript)
The language is good, but it takes some learning
The real power: platform and community
Rich client/server architectures
Revolutionary frameworks like backbone, ember, angular
function foo(x, y) {
return x + y;
}
console.log(4, 6); // -> 10
function foo() {
var sum = 0;
for(var i=0; i<arguments.length; i++) {
sum += arguments[i];
}
return sum;
}
console.log(4, 6, 5); // -> 15
function foo() {
_.reduce(arguments, function(total, num) {
return total + sum;
}, 0);
}
console.log(4, 6, 5); // -> 15
Functions are first-class values
function foo() {}
var foo = function() {}
bar(1, 2, 3, function() {});
This single feature allowed JavaScript to thrive despite its shortcomings
function foo(x) {
return function(y) {
return x + y;
}
}
var sum10 = foo(10);
console.log(sum10(5)); // -> 15
function getStatus(obj) {
var fullname = obj.first + ' ' + obj.last;
return function() {
$.get('/status', { name: fullname }, function(res) {
$('.result').text(res);
}
}
}
var req = getStatus({ first: 'James', last: 'Long' });
// later...
req();
var [x, y] = [5, 6];
var {x ,y} = {x: 5, y: 6};
[0, 1, 2].map(function(x) { return x + 1; });
[0, 1, 2].map(x => x + 1);
What do you want out of this group?
Tell us what you work on, and
what you're interested in!