Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // let x = 10
- //shortcut
- //x = x + 1 x = x / 2 / x++ x--
- // x /= 2
- // x %= 2
- //operands++
- //+ operands
- // console.log(--x)
- // console.log(x)
- // console.log(++x)
- // console.log(x)
- //comparison
- console.log(1 == Number('1')) //only consider value
- console.log(1 === '1') //consider both value and type
- //conversion (explicit)
- //coercion(implicit conversion)
- // concatenation (+)
- //if any of the part is string , convert other part to string
- // console.log(1 + 'Hello')
- // //else(- * / %) javascript try it's to calculate the result
- // //if possible you will get number
- // console.log('10' * true)
- // //or not Possible -NaN
- // console.log(1 * 'Hello') //NaN
- //operator precedence and associativity
- // console.log(2 * (2 * 3))
- //object({}, [], null)
- //Array
- // console.log(Array.isArray({}))
- // //compare null === null , undefined == null
- // //number(10, NaN)
- // console.log(Number.isNaN(Number('ggjgb')))
- //undefined vs null
- // let z;
- // console.log(z)
- // let bogus = null
- // console.log(bogus === null )
- // Freecodecamp
- //Approach
- //understanding the problem but don't know how to code (hint)
- //Not understanding the problem(support)
- //successful - Hint(For Different approach)
Add Comment
Please, Sign In to add comment