Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript strings vs numbers

let message = 'hello'; //string
let sum = 5;           //number
let x = -15.25;        //number
let year = "2021";     //string
Comment

js string vs number difference

let x = 2;       // number
let y = '2';     // string

console.log(x + x); // 4
console.log(x + y); // 22
Comment

PREVIOUS NEXT
Code Example
Javascript :: change node bash root 
Javascript :: google maps color pin 
Javascript :: how to not use relative imports in react js 
Javascript :: discord.js mobile status 
Javascript :: python dictionary setdefault in javascript 
Javascript :: app.router.navigate reset framework7 
Javascript :: javascript count occurence of character in string 
Javascript :: iteration through json with key value pairs 
Javascript :: how to extract strings in array js 
Javascript :: how to assign empty function in react component props 
Javascript :: Fetching data error and pending load check 
Javascript :: js switch 
Javascript :: The element.appendChild() Method 
Javascript :: collision javascript 
Javascript :: post object 
Javascript :: leafletjs code 
Javascript :: javascript check if url ends with slash 
Javascript :: jquery add event to dynamically created element 
Javascript :: javascript find first element of array 
Javascript :: python restapi use post json 
Javascript :: how to access items inside anonymous object 
Javascript :: Remove Array Duplicate 
Javascript :: first unique character in a string javascript 
Javascript :: arrow functions javascript 
Javascript :: nested model in angular 
Javascript :: next js generate pdf complete 
Javascript :: nodejs parallel async calls -1 
Javascript :: jquery event delegation 
Javascript :: filter data from object 
Javascript :: notify jquery 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =