Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript Non-numeric String Results to NaN

// non-numeric string used with - , / , * results to NaN

let result;

result = 'hello' - 'world';
console.log(result); // NaN

result = '4' - 'hello';
console.log(result); // NaN
Comment

PREVIOUS NEXT
Code Example
:: array of numbers to array of objects 
:: eager loading 
::  
::  
Javascript :: javascript Symbols are not included in for...in Loop 
:: javascript Arguments Binding 
Javascript ::  
Javascript :: javascript Error handling is easier to manage 
Javascript :: javascript Assigning to a new property on a non-extensible object is not allowed 
Javascript ::  
:: actionscript round roundnumber 
::  
Javascript :: Multiply string using a for loop 
Javascript ::  
Javascript ::  
:: vuejs.org español 
:: phaser add animation event 
Javascript ::  
Javascript :: Pretty-Print JSON within Neovim 
::  
:: getauth firebase admin node.js 
Javascript :: check change from service variable angular 
Javascript ::  
Javascript ::  
::  
:: javascript extract array from object 
Javascript :: first name last name concatenate javascript with ternary operator 
Javascript :: javascript output a message into console 
::  
::  
ADD CONTENT
Topic
Content
Source link
Name
8+5 =