+ 4

Expressions vs statements

What's the difference between expressions and statements?

29th Nov 2019, 3:02 PM
Salih Benlalla
Salih Benlalla - avatar
5 Answers
+ 9
An expression evaluates to a value. A statement does something. Statements represent an action or command e.g print statements, assignment statements. Expression is a combination of variables, operations and values that yields a result value https://stackoverflow.com/questions/4728073/what-is-the-difference-between-an-expression-and-a-statement-in-JUMP_LINK__&&__python__&&__JUMP_LINK đŸŒ Coding Panda đŸŒ I didn't feel the need to make a new answer but I fixed your link 🙂 Good day to you
29th Nov 2019, 3:13 PM
Raj Chhatrala
Raj Chhatrala - avatar
0
ananya gupta i didn't asked for the differences between javascript, python and c++, i asked for the difference between an expression and a statement
2nd Dec 2019, 1:53 PM
Salih Benlalla
Salih Benlalla - avatar
0
Expressions produce a value, and that value will be passed into the function. Statements don't produce a value, and so they can't be used as function arguments. https://www.softcrayons.com/java-training-institute-noida
2nd Sep 2024, 6:35 AM
pramod kala
pramod kala - avatar