Notice
Recent Posts
Recent Comments
Link
Silver Library (Archived)
JavaScript Expression? 본문
반응형
What is a JavaScript Expression? - Mastering JS
Expression do evaluate to a value.
0 // 0
1 + 1 // 2
'Hello' + ' ' + 'World' // 'Hello World'
{ answer: 42 } // { answer: 42 }
Object.assign({}, { answer: 42 }) // { answer: 42 }
answer !== 42 ? 42 : answer // 42
answer = 42 // 42
Statement do not evaluate to a value.
// `if` statement
if (answer !== 42) { answer = 42 }
//`for` is a statement
for (;;){ console.log('Hello, World'); }
//Declaring a variable is a statement
let answer = 42
'Personal DB > Mainly for Front-end' 카테고리의 다른 글
[basic] The web and web standards (0) | 2021.02.28 |
---|---|
[JS] Resize the screen, then change the colour (0) | 2020.11.26 |
JavaScript - explanation of 'Property' (0) | 2020.11.26 |
What is DOM? (0) | 2020.11.25 |
Example of 'Array inside a JS Object' (0) | 2020.11.24 |