I've some seen some Javascript code containing CDATA. e.g. below which I copied from http://www.w3schools.com/xml/xml_cdata.asp
<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
{
return 1;
}
else
{
return 0;
}
}
]]>
</script>
Note that I did a description contained on link above. However I could come to conclusion on when to decide to use the CDATA tag.
If anyone could help me understand the purpose of this tag and when to use it will be great.