文件名称:text-analyzer:可以分析文本段落(例如段落)的小型应用程序
文件大小:3KB
文件格式:ZIP
更新时间:2024-05-12 10:00:14
JavaScript
描述:wordCounter() 测试:“如果段落只有一个单词,则应该返回1”。代码:const text =“ hello”; wordCounter(text); 预期输出:1 测试:“如果段落包含两个单词,则应返回2”。代码:const text =“ hello there”; wordCounter(text); 预期产量:2 测试:“它应该为空字符串返回0”代码:wordCounter(“”); 预期输出:0 测试:“对于只有空格的字符串,它应该返回0”。代码:wordCounter(“”); 预期输出:0 测试:“它不应将数字视为单词。” 代码:wordCounter(“ hi there 420 69”); 预期产量:2 描述:numberOfOccurrencesInText() 测试:“对于空字符串,它应返回0次出现的单词”代码:const text
【文件预览】:
text-analyzer-main
----css()
--------styles.css(0B)
----index.html(1KB)
----js()
--------scripts.js(2KB)
----README.md(2KB)