node js to int

// Step 1: Declare a variable and assign a string representing an integer
const strNumber = "123";

// Step 2: Use the parseInt function to convert the string to an integer
const intNumber = parseInt(strNumber);

// Step 3: Print or use the integer value
console.log(intNumber);