1) What is Moment.js used for? a) File handling b) Date and time manipulation c) Array sorting d) Data encryption 2) How do you include Moment.js in a Node.js project? a) require('moment') b) import moment from 'date-module' c) const moment = require('time-manager') d) include('moment.js') 3) Which method gets the current date and time using Moment.js? a) moment.date() b) moment.get() c) moment() d) moment.now() 4) What is the correct way to format the date as YYYY-MM-DD in Moment.js? a) moment().format('YYYY-MM-DD') b) moment().formatDate('YYYY-MM-DD') c) moment().toDate('YYYY-MM-DD') d) moment().toString('YYYY-MM-DD') 5) How do you add 7 days to the current date in Moment.js? a) moment().addDays(7) b) moment().plus(7, 'days') c) moment().add(7, 'days') d) moment().add(7) 6) What does moment().subtract(1, 'month') do? a) Subtracts 1 day from the current date b) Subtracts 1 hour from the current date c) Subtracts 1 month from the current date d) Subtracts 1 year from the current date 7) How can you get the day of the week for a specific date in Moment.js? a) moment().day() b) moment('2025-01-01').format('dddd') c) moment().getDay() d) moment().weekDay() 8) Which method is used to check the difference between two dates in days? a) moment().diffInDays(otherDate) b) moment().difference(otherDate, 'days') c) moment().diff(otherDate, 'days') d) moment().daysBetween(otherDate) 9) How do you parse a date in DD/MM/YYYY format using Moment.js? a) moment('25/12/2025').toDate('DD/MM/YYYY') b) moment('25/12/2025', 'DD/MM/YYYY') c) moment('25-12-2025', 'DD-MM-YYYY') d) moment().parse('25/12/2025', 'DD/MM/YYYY') 10) How do you get the current year using Moment.js? a) moment().get('year') b) moment().year() c) moment().getYear() d) Both A and B
0%
Quiz#7 - NodeJS
Delen
Delen
Delen
door
Kdyahya
Inhoud Bewerken
Afdrukken
Embedden
Meer
Toewijzingen
Scorebord
Meer weergeven
Minder weergeven
Dit scoreboard is momenteel privé. Klik op
Delen
om het publiek te maken.
Dit scoreboard is uitgeschakeld door de eigenaar.
Dit scoreboard is uitgeschakeld omdat uw opties anders zijn dan die van de eigenaar.
Opties Herstellen
Quiz
is een open template. Het genereert geen scores voor een scoreboard.
Inloggen vereist
Visuele stijl
Lettertypen
Abonnement vereist
Opties
Template wisselen
Alles weergeven
Er zullen meer templates verschijnen terwijl je de activiteit gebruikt.
Open resultaten
Kopieer link
QR-code
Verwijderen
Automatisch opgeslagen activiteit "
" herstellen?