Skip to content

Tag: class

How can I change data-id value in Class with a script?

I need to set random data-id with two value A y B. I need a script that can do this Answer For archiving this think you have to do three steps. First: Collect all values you need into an array. Second: Generating a random integer number. Based on Generate random number between two numbers in JavaScript The pa…

How @Inject(REQUEST) works and how to destructure it

The first question is how it’s possible that an injected parameter is changing after the class initialization. Because this code works and this code doesn’t work The second example doesn’t have ‘userId’ yet that should be injected by my nest.js interceptor. Why it’s like th…