Category Archives: programming languages

Javascript, you’ve got to love it

In almost all computer languages a string is just a list of characters, like this sentence.

Strings in Javascript are fun!

The toString() method and the function String(..) both convert a number to a string.
With x = 12.3 and y=10000000

String(x)*2 gives 24.6
String(x)/String(y) gives 0.00000123
String((100 + 23).toString()-((-1)*String(x))) gives 135.3
(100 + 23).toString()+String(x) gives 12312.3

Work it out !!!!


Leave a comment

Filed under javascript, programming languages