What does this code mean? What do you mean by [] and after []?

 this.$route.query.keyword.split(",")[this.$route.query.keyword.split(",").length - 1]
Apr.01,2021

for example, there is a url link: xxxx.com/path?keyword=a,b,c,d,e
this code takes keyword corresponding value a code divides the last item of the array by comma, that is, e


add a variable to make it clearer

const args = this.$route.query.keyword.split(','); // keyword
args[args.length-1]; // 

get the last value of the comma in the keyword parameter of the current link

  

take the last value in the array converted by keyword

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f8fe-2c48b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f8fe-2c48b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?