JavaScript`te Sayısal formata çevirme

string bir değeri sayıya çevirmek için kullanılabilecek 9 yöntem

String bir değeri sayısal formata çevirmek için bir çok yöntem mevcut

const sayi = "1000"


const metod_1 = Number(sayi);         // 1000
const metod_2 = parseInt(sayi);       // 1000 
const metod_3 = Math.floor(sayi)      // 1000
const metod_4 = Math.round(sayi);     // 1000
const metod_5 = ~~sayi;               // 1000
const metod_6 = +sayi;                // 1000
const metod_7 = sayi - 0;             // 1000
const metod_8 = sayi * 1;             // 1000
const metod_9 = sayi << 0;            // 1000