It’s not a web toy:
Load and go delivery:
It doesn’t make any .exe, .dll or ay abstract class files. So, it throws errors and exceptions only while executing that particular path of the program. This approach has two advantages.
Second, if some other part of the same program is under construction, then also you can run the other flows of the program.
Though the fashion is with strongly typed languages, where we let the compiler to check and compile as much as possible, the loosely typed language has also its own advantages.
- Loosely typed language gives the developer more control over the code. He doesn’t have to bother the variable type, function return type and all those stuffs.
- An attribute can be read from any object. It doesn’t matter of which type it is.
- There is no need to for function overloading separately. One function can handle all types.
- No types mismatch error in your whole function.
Objects are special here:
Objects as general containers:
This was a brilliant idea; to make objects as hash table, where you can add any property to an object at any point of time. This gives you the power to access the properties in different ways too; like, using the dot (.) operator (obj.propertyName), or using , like (obj[‘propertyName’]).
Objects as unordered collection:
Functions are different:
No need of function overloading:
A function is able to accept any type or arguments and also can return any type of value. They can accept any number of arguments even without declaring. This flexibility reduces a lot of codes in a project.
Syntactically also it has few advantages.
- It has a C like syntax structure.
- Multi level break is supported.
- Var a= input || myValue, syntax like this reduces the need of extra if else in the code.
- Missing semicolon is handled automatically.
It’s not only for browsers:
- PDF editors
- Yahoo Widgets