Suppose I have an MVC structure. Does writing JavaScript in script tags inside a PHP view file make the code more secured?
Will it still be seen by the client in source code? 
Will there be any issues because of this?
I have tried calling an Ajax in a PHP view, but my teacher told me not to do it. I thought the only reason why she told me not to do it was the code not to get too mixed up and unreadable. Please tell me about this topic.