偽代碼 - 示例


來源於:jade

偽代碼: 一般用來模擬真實代碼的一種簡寫方式

 

偽代碼:

 1 !!! 5  2 html(lang="en")  3  head  4  title= pageTitle  5  :javascript  6  | if (foo) {  7  | bar()  8  | }  9  body 10  h1 Jade - node template engine 11  #container 12  - if (youAreUsingJade) 13  You are amazing 14  - else 15  Get on it! 16  Get on it! 17  Get on it! 18          Get on it!

 

真實代碼:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Jade</title>
    <script type="text/javascript">
      //<![CDATA[
      if (foo) {
          bar()
      }
      //]]>
    </script>
  </head>
  <body>
    <h1>Jade - node template engine</h1>
    <div id="container">
      <p>You are amazing</p>
    </div>
  </body>
</html>    

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM