It's not very efficient, but something like this could work, if actual trigonometric calculations are thrown at it.
//Ray Trace - for loop
for(var i = 0; i < rayIterations; i++){
rectangle = new Rectangle(1, 1, ray.x, ray.y);
for(WallArray.length){
if(rectangle.hitTest(WallArray[whatever].rectangle)){
return true
}
}
}

Find content
Not Telling