lzm1005
V2EX  ›  Node.js

nodejs : ASCII 码值累加求和,所得结果模 65536 余数取反加 1 。求助!

  •  
  •   lzm1005 · Aug 25, 2019 · 6873 views
    This topic created in 2659 days ago, the information mentioned may be changed or developed.
    如题,该怎么写,谢谢!
    1 replies  •  2019-08-26 10:59:11 +08:00
    cephei
    cephei
    Aug 26, 2019
    1
    (~['a','b','c'].reduce((a,b)=>a+b.charCodeAt(0),0)%65536)+1 这样?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   892 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 20:54 · PVG 04:54 · LAX 12:54 · JFK 15:54
    ♥ Do have faith in what you're doing.