convert string to array in vue js
<template>
<div>
<!-- Your Vue component template here -->
</div>
</template>
<script>
export default {
data() {
return {
stringValue: "Hello,World",
stringArray: [],
};
},
mounted() {
this.stringArray = this.stringValue.split(',');
},
};
</script>
<style>
/ Your component styles here /
</style>