Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get first 2 digits of number javascript

const trial = "19.0.0.1"
console.log(trial.split(".").slice(0, 2).join("."))
// 19.0
 
PREVIOUS NEXT
Tagged: #digits #number #javascript
ADD COMMENT
Topic
Name
3+9 =