Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ifm-lw-r1-js

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifm-lw-r1-js - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

solution-1.js

2

package.json
{
"name": "ifm-lw-r1-js",
"version": "3.0.1",
"version": "3.1.0",
"description": "inFullMobile Language Wars: Round 1 - JavaScript",

@@ -5,0 +5,0 @@ "main": "f.js",

@@ -19,2 +19,6 @@ inFullMobile Language Wars: Round 1 - JavaScript

This solution uses a modern syntax.
To compare it with the original JavaScript syntax from 1995, see [the old JavaScript solution](https://github.com/rsp/ifm-lw-r1-ojs).
Solutions

@@ -25,10 +29,7 @@ ---------

1. Simple iterative solution with loops and temporary variables:
[old syntax](solution-1-old.js) ([gist][solution-1-old-gist]),
[new syntax](solution-1-new.js) ([gist][solution-1-new-gist])
2. Simple recursive solution with no loops and temporary variables:
[old syntax](solution-2-old.js) ([gist][solution-2-old-gist]),
[new syntax](solution-2-new.js) ([gist][solution-2-new-gist])
3. Compact functional solution with no loops, variables and arithmetical operators:
[old syntax](solution-3-old.js) ([gist][solution-3-old-gist]),
[new syntax](solution-3-new.js) ([gist][solution-3-new-gist])
[solution-1.js](solution-1.js) ([gist][solution-1-new-gist])
2. Simple recursive solution with no loops and no temporary variables:
[solution-2.js](solution-2.js) ([gist][solution-2-new-gist])
3. Compact functional solution with no loops, no variables and no arithmetical operators:
[solution-3.js](solution-3.js) ([gist][solution-3-new-gist])

@@ -35,0 +36,0 @@ Sample input

'use strict';
for (const i of [1, 2, 3]) {
for (const l of ['old', 'new']) {
const n = `solution-${i}-${l}`;
module.exports[n] = require(`./${n}`);
}
const n = `solution-${i}`;
module.exports[n] = require(`./${n}`);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc