new class js -advanced

This commit is contained in:
Philippe Torrel
2026-06-29 11:35:03 +02:00
parent ee8a87bf2a
commit 31c13250b0
104 changed files with 2632 additions and 138 deletions

View File

@@ -0,0 +1,8 @@
'use strict';
const distance = (
{ x: xOrigin, y: yOrigin },
{ x: xDestination, y: yDestination }
) => Math.sqrt((yDestination - yOrigin) ** 2 + (xDestination - xOrigin) ** 2);
console.log(distance({ x: 1, y: 1 }, { x: 5, y: 1 }));