你們如何寫一些簡單的代碼,你只用於自己的意見?您的方式來寫簡單的評論
我主要是寫JavaScript和PHP代碼,我真的覺得我找不到寫評論的好方法。
如果我有簡短的代碼行,我經常這樣做:
x = doThis(getSomeValueFromSomewhere()); // This is a short line of code
這似乎真的很好,我認爲,但是當行獲得多條線路長一點或者它並不真正起作用,
// Dont really like this since it's not clear if it describes only line 1, or all lines.
aLongerVariableName = (getSomeValueFromSomewhere() == "this is what I want") ? "true value" : "false value";
x = doThis(aLongerVariableName);
那麼,你是怎麼做到的?