W3Ask






HOME  >  PROGRAMMING  >  GLOBAL PROGRAMMING

WTF language feature




Here are several WTF language example. We have different ways to write an object or get a same result. These different approaches are not always comparable or even slightly similar.

In C :

You can index arrays like that

a[20]

And also like this :

20[a]

In Javascript :

‘6’ + 2 gives ‘62’

But

‘6’ – 2 gives 4

In Java :

Integer thousand = 1000;
Integer onek = 1000;

thousand <= onek; // true
thousand >= onek; // true
thousand == onek; // false

Still in Java :

Integer number= 67;
Integer rebmun = 67;

number<= rebmun ; // true
number>= rebmun ; // true
number== rebmun ; // true

Also, writing :

int[] numbers() {
return null;
}

Is the same as writing :

int numbers() [] {
return null;
}








Related posts:


No related posts.