This method is used to convert a term to binary.
term − This is the term value which needs to be converted to a binary value.
Returns a binary value based on the term specified.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[term_to_binary("hello")]).
When we run the above program we will get the following result.