Our experts have gathered these Meteor - JavaScript web framework MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of Meteor - JavaScript web framework by answering these multiple-choice questions.
Get started now by scrolling down!
A. .firstRun
B. .lastRun
C. .firstTime
D. .isFirst
A. Meteor.ClientCall.methods({ 'consoleLog': function(message) { console.log(message); }, });
B. Deps.autorun(function() { Meteor.ClientCall.setClientId(Meteor.userId()); });
C. Meteor.ClientCall.apply(userId, 'consoleLog', ['THIS MESSAGE SHOULD APPEAR IN THE CLIENT CONSOLE']);
D. All of the above
A. this.userId;
B. this.userID;
C. this.loggedUserID;
D. this.loggedUseId;
A. myMethod: function () { console.log(this.userId); function innerFunction() { console.log(this.userId); } innerFunction.bind(this); }
B. myMethod: function () { console.log(this.userId); function innerFunction() { console.log(this.userId); }; innerFunction.apply(this); }
C. myMethod: function () { var that = this; console.log(this.userId); function innerFunction() { console.log(that.userId); } innerFunction(); }
D. myMethod: function () { var userId = this.userId; console.log(this.userId); function innerFunction(userId) { console.log(userId); innerFunction(); }
E. All of the above
A. if(Meteor.isServer) { Meteor.invoke(‘sampleMethod'); }
B. if(Meteor.isClient) { Meteor.invoke(‘sampleMethod'); }
C. if(Meteor.isServer) { Meteor.call(‘sampleMethod'); }
D. if(Meteor.isClient) { Meteor.call(‘sampleMethod'); }
A. access
B. deny
C. allow
D. allows -WORNG ANDS
A. create()
B. update()
C. remove()
D. All of the above
A. Meteor.function('pack.add', text);
B. Meteor.apply('pack.add', text);
C. Meteor.call('pack.add', text);
D. All of the above
A. Template.fooTemplate.helpers({ myHelper: function(myString) { output = myString; } });
B. Template.fooTemplate.helpers({ myHelper: function(Parameters) { output = Parameters.hash.myString } });
C. Template.fooTemplate.helpers({ myHelper: function(Parameters) { output = Parameters.myString } });
A. Template.helloWorld.helpers({ txt: function () { return Template.instance().myAsyncValue.get(); } }); Template.helloWorld.add = function (){ var self = this; self.myAsyncValue = new ReactiveVar("Waiting for response from server..."); Meteor.call('getAsyncValue', function (err, asyncValue) { if (err) console.log(err); else self.myAsyncValue.set(asyncValue); }); }
B. Template.helloWorld.helpers({ txt: function () { return Template.instance().myAsyncValue.get(); } }); Template.helloWorld.created = function (){ var self = this; self.myAsyncValue = new ReactiveVar("Waiting for response from server..."); Meteor.call('getAsyncValue', function (err, asyncValue) { if (err) console.log(err); else self.myAsyncValue.set(asyncValue); }); }
C. Both of the above
D. None
A. 1
B. 2
C. 3
D. Infinite
A. There is a bug in the client code.
B. When a new user added a comment, his user information wasn't sent to the client.
C. The publication shown above never sends user information to the client.
D. The publication shown above is wrong
A. MyCollection.find();
B. MyCollection.fetch();
C. MyCollection.search();
D. MyCollection.get();
A. userId
B. userName
C. connectionId
D. clientAddress
A. Router.route('/files/:name_of_file', function() { //action }, { run: 'server'});
B. Router.route('/files/:name_of_file', function() { //action }, { where: 'server'});
C. Router.route('/files/:name_of_file', function() { //action }, { route: 'server'});
D. Router.route('/files/:name_of_file', function() { //action }, { at: 'server'});
A. Use SQL Sintax in client side: Get rid of minimongo limitations on grouping and unions. Use Alasql on the client and normalize mongo collections.
B. Use a SQL Connector: Try numltel's MySql and PG connectors, or meteor-stream PG connector. The disadvantage is that they break deployments to meteor.
C. Use mongo as a slave for relational database, keeping them in synch. MySql Shadow uses this. Also you might want to look at symmetric.ds to set mongo bidirectional replication with a lot of Sql engines.
D. All of the above
A. {{layout}}
B. {{#layout}}
C. {{% layout %}}
D. {{> layout}}
A. template name="home"> {{#markdown}} ##Welcome to my Site {{/markdown}}
B. template name="home"> {{markdown}} ##Welcome to my Site {{/markdown}}
C. template name="home"> {markdown} ##Welcome to my Site {/markdown}
A. meteor create myApp
B. meteor app myApp
C. meteor -create myApp
D. meteor -app myApp
A. created
B. onCreated
C. onDestroyed
D. rendered
A. Tracker.Computation.stop();
B. Tracker.Autorun.stop();
C. Tracker.Computation.halt();
D. Tracker.autorun.end();
A. meteor add accounts accounts-password
B. meteor add user accounts-password
C. meteor add accounts-ui accounts-password
D. meteor add user user-password
A. Meteor.publish('lists', function() { var user = Meteor.users.findOne(this.userId); return Lists.find({group: user.profile.group}); });
B. Meteor.publish('lists', function() { var user = Meteor.users.findOne(this.userId); if ( user && user.profile && user.profile.group ) return Lists.find({group: user.profile.group}); this.ready(); });
C. Both of the above
D. None of the above
A. reactive-json
B. reactive-dict
C. reactive-var
D. All of these. -WRONG ANS
A. loaded
B. rendered
C. ready
D. init
A. Session.set('counter', 0); Template.simple.counter = function () { return Session.get('counter'); } Template.simple.events({ 'click button': function () { Session.set('counter', Session.get('counter') + 1); } });
B. Template.set('counter', 0); Template.simple.counter = function () { return Session.get('counter'); } Template.simple.events({ 'click button': function () { Template.set('counter', Template.get('counter') + 1); } });
C. Template.get('counter', 0); Template.simple.counter = function () { return Session.set('counter'); } Template.simple.events({ 'click button': function () { Session.set('counter', Session.get('counter') + 1); } });
D. All of the above
A. Meteor.account.allow()
B. Meteor.permission.allow()
C. Meteor.roles.allow()
D. Meteor.users.allow()
A. HTTP.post(“http://someUrl”, postData, …);
B. HTTP.get(“http://someUrl”, … );
C. HTTP.request("GET", “http://someUrl”, … );
D. HTTP.call("GET", “http://someUrl”, … );
A. Regular Expression Search is real-time
B. Regular Expression Search can match partial words
C. Regular Expression Search is very efficient
D. Regular Expression Search does not support wildcard searches
A. Meteor.settings.facebook.token
B. Meteor.settings.public.token
C. Meteor.public.facebook.token
D. Meteor.settings.public.facebook.token
A. Accounts.ui.config({ username: true, email: false });
B. Accounts.ui.config({ passwordSignupFields: 'USERNAME_ONLY', });
C. Accounts.ui.config({ userNameOnly: true });
D. Accounts.ui.config({ email: false });
A. Handlebars.registerHelper('ifRouteIs', function (routeName) { return Meteor.Router.page() === routeName; });
B. Handlebars.registerHelper('ifRouteIs', function (routeName, options) { if (Meteor.Router.page() === routeName) { return options.fn(this); } return options.inverse(this); });
C. Handlebars.registerHelper.helper('ifRouteIs', function (routeName, options) { if (Meteor.Router.page() === routeName) { return options.fn(this); } return options.inverse(this); });
D. All of the above
A. Accounts.config({ closeClientAccountCreation: true });
B. Accounts.config({ forbidAccountCreation: true });
C. Accounts.config({ forbidClientAccountCreation: true });
D. Accounts.config({ closeAccountCreation: true });
A. meteor add secure
B. meteor add password
C. meteor remove insecure
D. meteor add policy
A. Accounts.validateLoginAttempt
B. Accounts.validateLogin
C. Accounts.loginAttempt
D. Accounts.validateLoginAttempts
A. Meteor.users.add(userId, {$set: { roles: {admin: true}, }});
B. Meteor.users.create(userId, {$set: { roles: {admin: true}, }});
C. Meteor.users.update(userId, {$set: { roles: {admin: true}, }});
D. Meteor.users.permission(userId, {$set: { roles: {admin: true}, }});
A. Simple, open Chrome console and type: Meteor.release() , you can also use it in code.
B. Simple, open Chrome console and type: Meteor.update() , you can also use it in code.
C. Simple, open Chrome console and type: Meteor.soon() , you can also use it in code.
D. All of the above
A. User enrollment
B. Email verification
C. Reset password
D. All of these.
A. satelizer
B. accounts-base
C. auth-strategy
D. auth-base
A. var loginRun; Template.bar.rendered = function() { loginRun = Deps.autorun(function() { if(Meteor.user()) { //Stuff to run when logged in } }); } Template.bar.destroyed = function() { loginRun.stop(); }
B. var loginRun; Templates.bar.rendered = function() { loginRun = Deps.autorun(function() { if(Meteor.user()) { //Stuff to run when logged in } } } Template.bar.destroyed = function() { loginRun.stop(); }
C. var loginRun; loginRun = Deps.autorun(function() { if(Meteor.user()) { //Stuff to run when logged in } }); Template.bar.destroyed = function() { loginRun.stop(); }
D. All of the above
A. {{> loginButtons}}
B. {{> loginDropDown}}
C. {{> login}}
D. {{> loginForm}}
A. login-forms
B. accounts-forms
C. accounts-ui-unstyled
D. accounts-ui -WRONG ANS
A. Router.route = {register: 'register'}
B. Router.route('register');
C. Router.route('/register');
D. Router.route('/&?register');
A. Tracker.reactive()
B. Template.autorun()
C. Tracker.autorun()
D. Template.execute()
A. Data On The Wire through the Distributed Data Protocol (DDP)
B. Latency Compensation with Mini Databases
C. Full Stack Reactivity with Blaze and Tracker
D. All of the above
A. There will be a lot of "getComments" subscriptions just after we add a comment
B. There will be a lot of "getComments" subscriptions just after the page loads
C. There will be a lot of "getUser" subscriptions just after we add a comment
D. There will be a lot of "getUser" subscriptions just after the page loads
A. {{#if currentUser}} <button id="submit-btn">Click me</button> {{else}} <p id="submit-text">Please log in to submit</p> {{/if}}
B. Template.newPost.rendered= function(){ if(Meteor.user()){ $('#submit-btn').show(); $('#submit-text').hide(); } else{ $('#submit-btn').hide(); $('#submit-text').show(); } }
C. Template.newPost.rendered= function(){ if(Meteor.user()){ $('#submit-btn').show(); $('#submit-text').hide(); } }
D. All of the above
A. patternMatch(myVar, String);
B. test(myVar, String);
C. match(myVar, String);
D. check(myVar, String);
A. Router.map(function() { this.router('Home', { route: '/' template: 'home' }); });
B. Router.mapper(function() { this.router('Home', { path: '/', template: 'home' }); });
C. Router.map(function() { this.route('Home', { path: '/', template: 'home' }); });
A. $meteorUtils.autorun($scope, function() { $meteorSubscribe.subscribe('aPublication', $scope.getReactively('parameter')) .then(function(){ alert("You subscribed !"); }); });
B. Meteor.publish("aPublication", function (parameter) { ACollection.find({'aProperty':'parameter'}) $subscribe.subscribe('aPublication',$scope.parameter).then(function(){ alert("You subscribed !"); });
C. Both of the above
D. None of the above