- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
var one = "Demo One!"; var two = "Demo Two"; var three = 5; var four = 30;
Now, let’s add it in one statement and see what happens. Since the line length increases, we need to take it to the next line,
var one = "Demo One!", two = "Demo Two", three = 5; four = 30;
Definitely, the first method is easy, less confusing and should be preferred.
- How to assign same value to multiple variables in single statement in C#?
- How to set two variables in a stored procedure with a single MySQL select statement?
- How to optimize many SELECTs in a single table in MySQL?
- How to alter multiple columns in a single statement in MySQL?
- How to print a string two times with single statement in Python?
- How many ways are there to initialize the instance variables of a class in java?
- How to use single statement suite with Loops in Python?
- How to compare two variables in an if statement using Python?
- Using variables with MySQL prepare statement