How to add components to a prefab via script

In a JS script, how would I add components to a prefab