In the JavaScript, almost syntaxes are like the syntax of Java, C# and are nearly like the C syntax. In some cases, this is very easy to use and many developers have used it. On the other hand, Ruby syntaxes are nearly like real language and likely Visual Basic of Microsoft. Moreover, in the ‘if’ statement of Ruby provides two ways to use, which one is like C syntax and another one is like the normal language. Sometime this makes developers confuse to use. For example,
if(x>7&&x<12) {...}
and if x.between(7,12) do ...
both two syntax are correct in Ruby. Especially, JavaScript just runs at client and Ruby runs on server, the Ruby is the application server.
The first similar between JavaScript and Ruby is the variable, there is no difference between variable types such as decimal, string or datetime. Secondly, they are Object Oriented Programming.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment