Skip to content
Advertisement

symbol/ how to split into two separate numbers

hi everyone so i’m solving the problem i have a script

this is the result from the web

JavaScript

how to split into two separate numbers?

the output is this how to do not let go if the number is greater than 5?

these are different numbers, for example:

JavaScript

They need that the second numbers is not greater than 5

JavaScript

normal code would be done like this

but the sign prevents me from doing that

JavaScript

the problem, however, makes me a sign / I don’t know how to separate the two numbers and if the second one is bigger than 5 so that the script doesn’t continue to work

Advertisement

Answer

You can use split function:

JavaScript

split returns an array, so second part is at position [1]

Update 1:

According to your comments you need specifically this:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement