how do i test my javascript function such as this one
function props(list, propertyName){var result=[];for(var x in list) { result.push(list[x][propertyName]);}return result;}
the instuctions for this were as follows
props( list, propertyName )
This function takes a list of elements and a propertyName string as input. The function returns a list that is generated by obtaining the property-named value of an input element. If a list element doesn't have a property of the specified name, then its value is given as undefined.
Examples
if there is an online ide that would work or anything would help! i just need to know how to test things like this for an assignment thank you!!
showing it working would be amazing as well thank yoU!!
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here