Understanding how to create a join in JavaScript

I need some help understanding how to create a join in JavaScript.

I currently have a friend requests table which has two foreign keys which are user ID's on the profiles table.

friend_requests table
sender_id UUID
receiver_id UUID

Currently I am doing a request to get back all the requests for a user

let { data: friend_requests, error } = await supabase .from('friend_requests') .select('*')

How do I structure this to get all the profile table rows with the sender and receiver UUID's? The profiles table has a id that matches up to the sender_id and receiver_id

Very new to SQL so I appreciate this help.
Was this page helpful?