Command substitution in linux shell scripting

Command substitution in Linux Shell Scripting can be done in 2 ways.
 
x=`ls`
x=$(ls)

In command substitution, output of the command is assigned to the variable.
Complex problems, Simple Solutions