T
T
The_XXI2020-04-27 00:38:12
JavaScript
The_XXI, 2020-04-27 00:38:12

How to split an unusual variable into parts?

There is such a variable, not a string, can I somehow separate everything up to the first comma?

var pos = new mp.Vector3(-2963.1335, 482.7227, 14.703);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GuMondi, 2020-04-27
@The_XXI

Maybe pos.x

K
Karpion, 2020-04-27
@Karpion

If this is a string, then you can use regex or simpler means of working with strings.
If it's an array, then by array index.
But in appearance - most of all it looks like a function call.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question