I need help with creating a loop that iterates over the given ids array


#1

I am stuck on an exercise in Learn Node -SQLite called “Using Placeholders”. I am stuck on instruction 1 which says “Create a loop that iterates over the given ids array. For now, just log every id number.” I am not sure on how to go about it. I need help. Here is my code.

const { printQueryResults } = require('./utils');
const sqlite = require('sqlite3');

const db = new sqlite.Database('./db.sqlite');

const ids = [1, 25, 45, 100, 360, 382];
ids.forEach((id) => )

#2

Whatever you do, do not repost this topic or the system will ban you. You were already in the pipeline. New users are closely monitored, and the forums have very strict link protocols in place.

In the meantime, please DM me the URL to the lesson page so I can publish it here without you being put under scrutiny, again.

I’ve removed the GIST links from your topics and replaced them with formatted code.


#3

This suggests to us that you are skipping ahead and ending way up the learning curve without a net. You will face many challenges in attempting to learn this way, and most of them will be rudimentary, which after awhile will become embarrassing. Just saying…

log every id number

Do you know what that means?


#4

@oduffy: Good reason to stop them at the door and test the requisites, from the ground up.