What is unary +operator? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is unary +operator?

8th Mar 2019, 5:22 AM
Arvind Dige
Arvind Dige - avatar
2 Answers
+ 4
It adds two numbers, or joins strings (text).
8th Mar 2019, 5:30 AM
Rowsej
Rowsej - avatar
+ 2
It does nothing*. It's just there because we have unary - aswell. (*It actually depends on what programming language you are talking about exactly.)
8th Mar 2019, 5:42 AM
Schindlabua
Schindlabua - avatar