From 59a5dce21635b14d25d1003a84fcd2fb51651306 Mon Sep 17 00:00:00 2001 From: Jim Cramer Date: Tue, 5 Nov 2024 23:45:00 +0100 Subject: [PATCH] Replace require wirh import --- 3-UsingAPIs/Week1/assignment/ex4-pokerDiceAll.js | 2 +- 3-UsingAPIs/Week1/assignment/ex5-pokerDiceChain.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/3-UsingAPIs/Week1/assignment/ex4-pokerDiceAll.js b/3-UsingAPIs/Week1/assignment/ex4-pokerDiceAll.js index bc940404..51014308 100644 --- a/3-UsingAPIs/Week1/assignment/ex4-pokerDiceAll.js +++ b/3-UsingAPIs/Week1/assignment/ex4-pokerDiceAll.js @@ -24,7 +24,7 @@ exercise file. // The line below makes the rollDie() function available to this file. // Do not change or remove it. -const rollDie = require('../../helpers/pokerDiceRoller'); +import { rollDie } from '../../helpers/pokerDiceRoller.js'; export function rollDice() { // TODO Refactor this function diff --git a/3-UsingAPIs/Week1/assignment/ex5-pokerDiceChain.js b/3-UsingAPIs/Week1/assignment/ex5-pokerDiceChain.js index be936b3f..5b1394b8 100644 --- a/3-UsingAPIs/Week1/assignment/ex5-pokerDiceChain.js +++ b/3-UsingAPIs/Week1/assignment/ex5-pokerDiceChain.js @@ -12,7 +12,7 @@ to expand the given promise chain to include five dice. // The line below makes the rollDie() function available to this file. // Do not change or remove it. -const rollDie = require('../../helpers/pokerDiceRoller'); +import { rollDie } from '../../helpers/pokerDiceRoller.js'; export function rollDice() { const results = [];