There's been many posts about how to say Hello World
in different programming languages, but is there many about variables?
Well this post will tell you about how to declare variables (specifically a string) in different programming languages.
-
Python
variable = "Hello World!"
-
JavaScript
var variable = "Hello World!"
-
Java
String variable = "Hello World!"
-
C++
string variable = "Hello World!"
-
PHP
$variable = "Hello World!"
-
C#
string variable = "Hello World!"
-
R
variable <- "Hello World!"
-
Rust
let mut variable = "Hello World!"
-
Swift
var variable = "Hello World!"
-
ruby
variable = "Hello World!"
That's it for now!
I hope you learnt something new and make sure to view all of my posts (and maybe follow).