Add code golf challenges for Vim practice, a weekly review template, and extend the cheatsheet with high-frequency commands. Fix the calculator `multiply` implementation and correct a logger import path.
26 lines
932 B
TypeScript
26 lines
932 B
TypeScript
// ============================================================
|
|
// Code Golf 场景 1:函数签名修改
|
|
// ============================================================
|
|
//
|
|
// 目标:用最少的 Vim 按键把下面的代码改成目标代码。
|
|
// 记录你的按键数!
|
|
//
|
|
// 💡 提示:c w 改单词、f ( 跳到括号、c i ( 修改参数、A 行尾追加
|
|
// ============================================================
|
|
|
|
function greet(name: string): string {
|
|
return "Hello, " + name;
|
|
}
|
|
|
|
// === 目标代码(用最少按键达到) ===
|
|
//
|
|
// function sayHelloTo(firstName: string, lastName: string): string {
|
|
// return `Hello, ${firstName} ${lastName}!`;
|
|
// }
|
|
//
|
|
// ============================================================
|
|
// 我的最佳成绩:
|
|
// 日期: ________ 按键数: ________
|
|
// 操作日志: ________________________________
|
|
// ============================================================
|