-1

There is a website that is updated all the time. I wan't to take from the website the number of the argument: "[" repeat and print it in var - 1. For example: [ Is shown 6 times the var will be 5 ( 6-1=5). Thank you.

1 Answers1

0

I wan't to take from the website the number of the argument: "[" repeat and print it in var - 1.

[ is not an argument and you weren't specific from where you would want to get the number of [ other than "THE WEBSITE"

console.log('L[orem i[psum [ dolor s[it amet['.match(/\[/g).length - 1);
WASD
  • 310
  • 1
  • 9