Skip to content
Advertisement

Tag: function

Why function returns filtered boolean array

I learn js and trying to write filter method without using it. So I need to my function return filtered array based on function, which passed as a parameter. And it does but it’s returned boolean array and I don’t understand why. My code: Calling with some numbers: myFilter([2, 5, 1, 3, 8, 6], function(el) { return el > 3

How to get an element inside a function javascript

I’m trying to use the value that each book has on its “status” and make the function “changeStatus()” run but “book.status” is defined inside a function, how can I get it? or is there any other way i can change the button behavior on click? I tried using a querySelector but it only allows me to click one button per

‘showPDF’ is declared but its value is never read

some background information: i have a button in my html file that should activate the showPDF function but it tells me that its value is never read javascript: the button in my html looks like this: help would be greatly appreciated as i can’t seem to find any answers in different questions Answer You just need to remove the duplication

function in javascript check repeated word not working [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 months ago. Improve this question Answer Please provide more information about your problem. Anyway you have to return

Advertisement