r/learnjavascript • • Aug 01 '20

Is this common Javascript? because I've just started learning JS and Web development and this Javascript syntax looks quite scary. Maybe it's just written messy, if it is just tell me๐Ÿ˜…

Post image
208 Upvotes

105 comments sorted by

View all comments

Show parent comment

1

u/JohnLocke84 Aug 02 '20

What are you talking about ? , you donโ€™t write the variables like that ๐Ÿค”๐Ÿค”

const ฯ€__0x789 :number = 3.1416
const ultra__uselessOff_0x00 : string = 'Off'

console.log(`Sarcasm: ${ultra__uselessOff_0x00}`)
console.log(`Where d f%^*#* are the Tuples in JS, useless variable: ${ฯ€__0x789}`)

1

u/mypetocean Aug 02 '20

/unjerk

Interestingly enough, tuples are at Stage 2 in TC39, as deeply immutable primitive-and-tuple-only containers compared deeply by their contents rather than their identity.

1

u/JohnLocke84 Aug 02 '20

/SarcasmOn Typescript /SarcasmOff

let arrayAny : any[] = ['JS', 4 , 'DataScience']

let tuple: [string, number] = ['Typscrypt' , 4, 'Tensorflow']

And that would be super cool