Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 only the second picture JS File Naming Convention - Multiple Answer. A JavaScript file named validationUtils.js has the following contents: var validationutils = 0);

image text in transcribed
2
image text in transcribed
only the second picture
JS File Naming Convention - Multiple Answer. A JavaScript file named "validationUtils.js" has the following contents: var validationutils = 0); validationutils.validatedals - function ( console.log('validatedate just ran'); }; validationutils.validateInteger = function () { console.log('validateInteger just ran'); }; Select all the responses that are true. This JavaScript file does not follow the JS Naming Convention (outlined in our lecture material) because you are not supposed to put more than one function in an external JS file. This JavaScript file follows the JS Naming Convention outlined in our lecture material. Suppose an HTML page had a reference to this external file.JS code in the HTML page would not be able to reference the functions defined in the US file leg., validation Utils.validateDate) because they would be out of scope. The JS Naming Convention (outlined in our lecture material) is designed to help you (and others) locate functions that have been defined in external US files. The JS Naming Convention (outlined in our lecture material) is designed to minimize the number of globally defined functions and objects which is important, especially when multiple programmers are contributing to a large web application 4 pts Question 20 JS File Naming Convention2 - Multiple Answer. A JavaScript file named "validate.js" has the following contents: function validatedate() console.log('validatedate just ran"); var validateInteger = function () { console.log("validateInteger just ran'); 3: Select all the responses that are true. This JavaScript file does not follow the JS Naming Convention (outlined in our lecture material) because the file is supposed to only contain a single function or object named the same as the file. Code like this is problematic leven though it will run without error and even though things are named reasonbly well) because when you see a reference to one of these functions (validateDate or validatelngeter), you'll have to guess which JS file the function is in m Code like this is not well designed because it declares more global functions than it needs to. It is important not to "pollute the global namespace" especially when working on large projects in a programming team

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

don't solve this question otherwise I will give you 2 0 dislike

Answered: 1 week ago