Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Javascript is a disaster (Score 1) 305

No scope to speak of

well, it's not true really. In the following example x will have global scope and y will be local to its function:

x=2;
function test() {

    y = x + 3;
}

--

The declaration of the variable 'y' in the example is missing its keyword 'var' and will unintentionally create a globally scoped variable.
Should be:
var x = 2;
function test(){
var y;
y = x + 3; // could also place the var statement inline with assignment operator
}
console.log(x); // prints 2 to the JS console
console.log(typeof y); // prints 'undefined' to the JS console

- well, there is the keyword "inherits" and it does allow an object to be extended and you can use the 'prototype' to have multiple inheritance.

The prototype inheritance pattern doesn't allow for true multiple inheritance (like what C++ has). However, you can fake it by munging functions from multiple classes into your class' prototype effectively providing the functionality of multiple inheritance in simple cases.

Comment Yahoo has APIs for mail access... (Score 1) 249

meaning that third parties can implement their own interface to Yahoo! mail.

http://developer.yahoo.com/mail/

This may be what Fairpoint is doing to give users access through their branded portal. These same APIs mean that any user can implement their own non-Fairpoint approved access mechanism for their webmail.

It may not be a solution for all users, but at least yahoo's opened up enough that there are options available in the case of abusive network access providers.

Slashdot Top Deals

The one day you'd sell your soul for something, souls are a glut.

Working...