Skip to content
Advertisement

Tag: methods

TypeError: this.$refs is not a function

So I have a problem with VueJs. I created a “Confirmation Dialogue” and added it to a On-Click-Event on buttons. It worked fine. Now I tried to copy the implementation to add it to another button on a different parent. It says “TypeError: this.$refs.confirmDialogue.show is not a function” in the Console whenever I try to click the button. The other

How to write this function with forEach?

I am trying to group the people by their age and as you can see, my code works with the reduce method. I managed to get this working but now I want to do the same with forEach method. Here’s my code: Answer Reduce accepts initial value that you update each iteration and return. So if you wish to use

How to add two integers in one line

Hello im new to java and in my class my prof wants us to create a program that will compute the sum of two numbers. (Use methods) For example: Input an integer: 95 //Expected Output: The sum is 14 //(9+5=14) im really lost on this one because i really don’t know how to do this please help Answer If you

What is the appropriate use for the .replace method within this context/ within a .map method?

I’m trying to loop through an array of strings and for each element(string) in that array, change the character after the “_” underscore character to a “*” character. Strings are immutable so, pushing this all to a new array. The chain performs as expected when directly targeting the underscore for replacement: But the moment the actual intended function is pursued,

Advertisement