A patent protects new inventions, processes, or scientific creations, a trademark protects brands, logos, and slogans, and a copyright protects original works of authorship.
Copyright doesn’t protect inventions, but it does protect the actual lines code (a work of authorship by the coder) but doesn’t stop someone writing new code to do the same task
patents are for innovative new things, and as the inventor, you’re supposed to have some time to profit from your invention
Latest Answers