C++ if I guess correctly?
And I assume that the time.sleep is like a "wait 2000 milliseconds" thing?
I am not a coder so it is all guesswork.
I think what made me think it was javascript first was code outside of a function. That might be possible too in c++ but if so insanely frowned upon. More than insanely.
My thought was it was javascript. Which is usually transmitted in cleartext so this is retarded. I guess, um, he thought his Chinese was code talk
not even close. a proper c++ function has like 8 decorations and half of them are macros. then you need different #ifdefs for different calling conventions, inline macro versions, and linkage specifiers
this doesn't even have a type-obscured return value! amateur hour! get a real return type with move semantics and constexpr optimization potential! do you even r-value bro?
Var is legacy for defining variables in Javascript I believe. Not sure how many languages use var.
Prepended edit (hmmm): http://blog.niftysnippets.org/2008/03/horror-of-implicit-globals.html
What's legacy about it? I haven't kept up, and my search says you have to use it.
Apparently, it's also legal in C# beginning in version 3. I didn't know that.
I only just started trying to pick up Javascript, but from what I've seen.. the 'let' keyword is best practice, the course I'm using says to use 'let' rather than 'var'.
I'm not sure what the difference really is though.
GDScript (Godot's language) uses the var keyword
(post is archived)