Jump to content
Killersites Community
Sign in to follow this  
jovyjoy

Difference of "Code" and "Script"

Recommended Posts

Hi!

 

I am currently in the documentation stage of our Project. I was asked to put the source code, function, file name and tables used because the client asked us to, (it might also serve as their user manual?). Well, I am just an intern and is therefore still new to this kind of business, and so that I will not make a huge mistake, may I just ask from you what the difference of a code and script is so that I will be able to identify which is code and which is script. It might sound stupid but, I am really confused. Thanks!

Share this post


Link to post
Share on other sites

I'm pretty sure code is any line of code of Javascript, PHP, etc. A script is a set of codes that perform a specific function that you want.

 

uhm, so I can't just simply say that code is synonymous to script right? Thanks :)

Share this post


Link to post
Share on other sites

All script is code, but not all code is script

 

ayie, exactly the reason why I got confused in explaining the codes. I got stuck but hopefully, I was able to explain the code for the clients! Thanks guys!

Share this post


Link to post
Share on other sites

Here is an example of a simple line of code.

 

<?php
  echo "Hello World";
?>

 

This is an example of a simple simple simple script.

 

  if ($user == $username) {
      echo "Hello, You are verified.";
  } else {
      echo "Sorry, That is not correct.";
  }

 

The script does something if you need to check something etc. Code is what builds up the script if that helps any. They are pretty much the same though

Share this post


Link to post
Share on other sites

Here is an example of a simple line of code.

 

<?php
  echo "Hello World";
?>

 

This is an example of a simple simple simple script.

 

  if ($user == $username) {
      echo "Hello, You are verified.";
  } else {
      echo "Sorry, That is not correct.";
  }

 

The script does something if you need to check something etc. Code is what builds up the script if that helps any. They are pretty much the same though

 

Thanks! That's a great help! :)

Share this post


Link to post
Share on other sites
Guest Danish

Ya, morgan is right and i am agree with him now you got the answer of your question and thanks morgan because you explain in very well way............

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×