Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 284 Bytes

unary-operators.md

File metadata and controls

16 lines (12 loc) · 284 Bytes

Unary operators

let year = 1989
++year // increments year b4 use in 1990

let nume = 89
console.log(nume++) // 89
console.log(nume) //increments after use to 90 

let v = 5
--v // decrements

let hub = '5'
console.log(+hub) // + converts a string to numeric type