Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript undefined used with number, boolean or null

// Arithmetic operation of undefined with number, boolean or null gives NaN

let result;

result = 4 + undefined;
console.log(result);  // NaN

result = 4 - undefined;
console.log(result);  // NaN

result = true + undefined;
console.log(result);  // NaN

result = null + undefined;
console.log(result);  // NaN
Comment

PREVIOUS NEXT
Code Example
Javascript :: JavaScript for loop Display a Text Five Times 
Javascript :: array of numbers to array of objects 
Javascript :: how to make navbar links scroll to component react 
Javascript :: javascript Accessing Object Methods 
Javascript :: javascript Access String Characters 
Javascript :: navlink react active class 
Javascript :: javascript Tagged Templates 
Javascript :: javascript remaining elements of an array to a variable using the spread syntax 
Javascript :: date methods javascript 
Javascript :: electron InitializeSandbox() called with multiple threads in process gpu-process. 
Javascript :: ajax introduction 
Javascript :: alphanumeric without space regex 
Javascript :: jquery if each checkbox is checked push array using each site:stackoverflow.com 
Javascript :: promise limit time 
Javascript :: manter alguns campos objetos javascript 
Javascript :: change origin phaser 
Javascript :: phaser place on part of circle 
Javascript :: phaser mixed animation 
Javascript :: complex expression in programming 
Javascript :: multiple pagination angular material 
Javascript :: nodejs stream pipeline with custom transform 
Javascript :: marko js 
Javascript :: check if value is a string javascript 
Javascript :: ternary operators js 
Javascript :: export default function react 
Javascript :: node js mongodb update nested object 
Javascript :: anti aliasing 
Javascript :: in js pass infinite argument in function 
Javascript :: monngoose find from an array using in 
Javascript :: javascript function expression 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =