Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 26, 2022 12:11 pm GMT

Variables in languages

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).


Original Link: https://dev.to/vulcanwm/variables-in-languages-c4o

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To