I am learning JavaScript and I am planning to make a Chrome extension. I am making an Age Calculator. I have developed some code. I am stuck at how to use jQuery in an external JavaScript File?
if (ageYears > 0) {
document.write(ageYears +" year");
if (ageYears > 1) document.write("s");
if ((ageMonths > 0)||(ageDays > 0)) document.write(", ");
}
if (ageMonths > 0) {
document.write(ageMonths +" month");
if (ageMonths > 1) document.write("s");
if (ageDays > 0) document.write(", ");
}
if (ageDays > 0) {
document.write(ageDays +" day");
if (ageDays > 1) document.write("s");
}
manifest.json
{
"name": "Age Calculator",
"description": "This application gives you a calculation of how old are you today, since the day you were born.",
"version": "0.1",
"manifest_version": 2,
"app": {
"background": {
"scripts": ["background.js"]
}
},
"icons": { "128": "calendar-128.png" }
"author" : "Miral Kumbhani"
}