Discover companies you will love

  • Javascript Quiz + Answers
  • 2 registered

Wantedly x JSConf: Javascript Quiz Winners & Answers

Javascript Quiz + Answers
Freelance

on 2018-01-29

1,087 views

2 requested to visit

Wantedly x JSConf: Javascript Quiz Winners & Answers

Freelance
Freelance

Share this post via...

What we do

Founded in 2010, Wantedly is a Tokyo-based technology company helping you discover jobs that ignite your passion. We've built a social recruitment platform, where people and companies meet based on passion and values, rather than salary and benefits. We are one of Japan's leading business networking platforms with over 2.4-million monthly active users and brands like UBER, Airbnb and Buzzfeed are acquiring talent via Wantedly. Serving close to 40,000 companies in Japan, we provide recruitment marketing and employer branding expertise, not to mention, a platform to scout and meet talents that identify with your company. To find out more, visit our Employers page at www.wantedly.com/about/list. Wantedly has expanded internationally, including in Singapore, and through the power of social media networking, talents like yourself can make your dream job a reality. Sign up at sg.wantedly.com and Visit a company today!

Why we do

We are relentless in our mission to Create a World Where Work Drives Passion through products that can shape the future of work for generations. We built Wantedly Visit to be a platform that can provide opportunities for talents to discover their dream companies, while allowing companies to showcase their brand story and passion projects to build their dream team. As we connect talents and their purpose with companies and their values, we seek to help develop workplace culture and optimise employee engagement. Our social impact will be seen where people are happy with their jobs, thus motivating them to work hard which drives personal development and in turn create positive value to their organisation and to their environment.

How we do

Wantedly has achieved phenomenal success in Japan, and we continue on our mission on the international stage in Singapore and beyond! Through our Wantedly Values and our rigorous emphasis on building products that will impact the world, we will Create a World Where Work Drives Passion. We strongly believe in boldness to take initiative, expression of creativity, and taking pride in ownership – and we like to challenge people to unlock their fullest potential. By providing an environment full of energy and passion for our members, they can enjoy being part of an entrepreneurial team of talented, ambitious young people! Proudly global and fiercely local, the Wantedly Singapore Squad comprises of an international team who have all come to embrace our city island as home and Singlish as their mother tongue. We bond with one another while discovering the best local food and new bubble tea flavours, and problem solving together for our business!
Our CEO, Akiko Naka
The Singapore Squad
Kicking in 2022!
Wantedly International <3
Join our Singapore Squad and Create a World Where Work Drives Passion with us
Working remotely has been the new normal but that doesn't stop us from pursuing our mission!

As a new team member

From 25th Jan to 27th Jan, Wantedly took part in JSConf.Asia 2018, where JavaScript developers gather for a 3-day event with two main objectives: - Push the boundaries of what is thought to be conceivable with JS - Engage in exceptional human social activities that encourage community and friendship building We distributed a short but tricky JS quiz during this event, and the enthusiasm showed by participants was much higher than expected. Over 100 JS developers attempted the quiz! Thank you everyone for your kind support :) Here are the questions: What are the result of the following expressions? ! ! [ ] // -> _______ [ ] == true // -> _______ Number.MIN_VALUE > 0 // -> _______ (0.1 + 0.2) === 0.3 // -> _______ [1, 2, 3] + [4, 5, 6] // -> _______ 'b' + 'a' + + 'a' + 'a' // -> _______ (Hint: Minions ;) ) What will the following code output? const arr = [10, 12, 15, 21]; for (var i = 0; i < arr.length; i++) { setTimeout(function() { console.log('Index: ' + i + ', element: ' + arr[i]); }, 3000); } _____________________________ What do the two functions below return? function func1() { return { bar: "hello" } } function func2() { return { bar: "hello" } } func1() // -> ____________ func2() // -> ____________ Name one programming paradigm that characterizes JavaScript. ______________________________ ----------------------------------------------------------------------------------------------------------------------------- It was an intense fight to be the fastest and most accurate JS developer at JSConf Asia 2018. Before we announce the winners, here are the answers and explanations. ! ! [ ] // -> true An array is a truthy value. By using the logical NOT operator (!) twice, the empty array is converted first to false, then true. - Description of logical NOT operator: https://www.ecma-international.org/ecma-262/#sec-logical-not-operator [ ] == true // -> false An array is a truthy value, however, it's not equal to true. - Description of empty array: https://stackoverflow.com/questions/5491605/empty-arrays-seem-to-equal-true-and-false-at-the-same-time - Description of Abstract Equality Comparison (==): https://www.ecma-international.org/ecma-262/#sec-abstract-equality-comparison Number.MIN_VALUE > 0 // -> true The value of Number.MIN_VALUE is the smallest positive value of the Number type, which is approximately 5 × 10-324. In the IEEE 754-2008 double precision binary representation, the smallest possible value is a denormalized number. If an implementation does not support denormalized values, the value of Number.MIN_VALUE must be the smallest non-zero positive value that can actually be represented by the implementation. (0.1 + 0.2) === 0.3 // -> false The constants 0.2 and 0.3 in JavaScript are approximations to their true values. It happens that the closest double to 0.2 is larger than the rational number 0.2 but that the closest double to 0.3 is smaller than the rational number 0.3. The sum of 0.1 and 0.2 ends up being larger than the rational number 0.3 and produces the result "false". This problem is so known that there is even a website called 0.30000000000000004.com. It occurs in every language that uses floating-point math, not just JavaScript :D [1, 2, 3] + [4, 5, 6] // -> 1, 2, 34, 5, 6 [1, 2, 3] + [4, 5, 6] // call toString() [1, 2, 3].toString() + [4, 5, 6].toString() // concatenation '1,2,3' + '4,5,6' // -> '1,2,34,5,6' 'b' + 'a' + + 'a' + 'a' // -> baNaNa (Hint: Minions ;) ) The expression is evaluated as 'b' + 'a' + (+'a') + 'a', which converts 'a' to not a number. What will the following code output? const arr = [10, 12, 15, 21]; for (var i = 0; i < arr.length; i++) { setTimeout(function() { console.log('Index: ' + i + ', element: ' + arr[i]); }, 3000); } Index: 4, value: undefined (printed 4 times) Full explanation here: https://www.reddit.com/r/javascript/comments/7535tm/amazon_web_developer_loop_timeout_interview/ What do the two functions below return? function func1() { return { bar: "hello" } } function func2() { return { bar: "hello" } } func1() // -> { bar: "hello" } func2() // -> undefined The reason for this has to do with the fact that semicolons are technically optional in JavaScript (although omitting them is generally really bad form). As a result, the func2 is interpreted as: function func2() { return; { bar: "hello" }; // never be executed } Name one programming paradigm that characterizes JavaScript. We accepted all answers that made sense for this question :) And now, finally, for our winners! 1. Paul Clark Score: 9 Time: 2:18 2. Thai Pangsakulyanont Score: 8 Time: 2:14 3. Rama Score: 7 Time: 2:20 Special Mention: 4. Nick Peekhanov Score: 7 Time: 3:21 5. Aivan Monceller Score: 6 Time: 2:03

What we do

Our CEO, Akiko Naka

The Singapore Squad

Founded in 2010, Wantedly is a Tokyo-based technology company helping you discover jobs that ignite your passion. We've built a social recruitment platform, where people and companies meet based on passion and values, rather than salary and benefits. We are one of Japan's leading business networking platforms with over 2.4-million monthly active users and brands like UBER, Airbnb and Buzzfeed are acquiring talent via Wantedly. Serving close to 40,000 companies in Japan, we provide recruitment marketing and employer branding expertise, not to mention, a platform to scout and meet talents that identify with your company. To find out more, visit our Employers page at www.wantedly.com/about/list. Wantedly has expanded internationally, including in Singapore, and through the power of social media networking, talents like yourself can make your dream job a reality. Sign up at sg.wantedly.com and Visit a company today!

Why we do

Join our Singapore Squad and Create a World Where Work Drives Passion with us

Working remotely has been the new normal but that doesn't stop us from pursuing our mission!

We are relentless in our mission to Create a World Where Work Drives Passion through products that can shape the future of work for generations. We built Wantedly Visit to be a platform that can provide opportunities for talents to discover their dream companies, while allowing companies to showcase their brand story and passion projects to build their dream team. As we connect talents and their purpose with companies and their values, we seek to help develop workplace culture and optimise employee engagement. Our social impact will be seen where people are happy with their jobs, thus motivating them to work hard which drives personal development and in turn create positive value to their organisation and to their environment.

How we do

Kicking in 2022!

Wantedly International <3

Wantedly has achieved phenomenal success in Japan, and we continue on our mission on the international stage in Singapore and beyond! Through our Wantedly Values and our rigorous emphasis on building products that will impact the world, we will Create a World Where Work Drives Passion. We strongly believe in boldness to take initiative, expression of creativity, and taking pride in ownership – and we like to challenge people to unlock their fullest potential. By providing an environment full of energy and passion for our members, they can enjoy being part of an entrepreneurial team of talented, ambitious young people! Proudly global and fiercely local, the Wantedly Singapore Squad comprises of an international team who have all come to embrace our city island as home and Singlish as their mother tongue. We bond with one another while discovering the best local food and new bubble tea flavours, and problem solving together for our business!

As a new team member

From 25th Jan to 27th Jan, Wantedly took part in JSConf.Asia 2018, where JavaScript developers gather for a 3-day event with two main objectives: - Push the boundaries of what is thought to be conceivable with JS - Engage in exceptional human social activities that encourage community and friendship building We distributed a short but tricky JS quiz during this event, and the enthusiasm showed by participants was much higher than expected. Over 100 JS developers attempted the quiz! Thank you everyone for your kind support :) Here are the questions: What are the result of the following expressions? ! ! [ ] // -> _______ [ ] == true // -> _______ Number.MIN_VALUE > 0 // -> _______ (0.1 + 0.2) === 0.3 // -> _______ [1, 2, 3] + [4, 5, 6] // -> _______ 'b' + 'a' + + 'a' + 'a' // -> _______ (Hint: Minions ;) ) What will the following code output? const arr = [10, 12, 15, 21]; for (var i = 0; i < arr.length; i++) { setTimeout(function() { console.log('Index: ' + i + ', element: ' + arr[i]); }, 3000); } _____________________________ What do the two functions below return? function func1() { return { bar: "hello" } } function func2() { return { bar: "hello" } } func1() // -> ____________ func2() // -> ____________ Name one programming paradigm that characterizes JavaScript. ______________________________ ----------------------------------------------------------------------------------------------------------------------------- It was an intense fight to be the fastest and most accurate JS developer at JSConf Asia 2018. Before we announce the winners, here are the answers and explanations. ! ! [ ] // -> true An array is a truthy value. By using the logical NOT operator (!) twice, the empty array is converted first to false, then true. - Description of logical NOT operator: https://www.ecma-international.org/ecma-262/#sec-logical-not-operator [ ] == true // -> false An array is a truthy value, however, it's not equal to true. - Description of empty array: https://stackoverflow.com/questions/5491605/empty-arrays-seem-to-equal-true-and-false-at-the-same-time - Description of Abstract Equality Comparison (==): https://www.ecma-international.org/ecma-262/#sec-abstract-equality-comparison Number.MIN_VALUE > 0 // -> true The value of Number.MIN_VALUE is the smallest positive value of the Number type, which is approximately 5 × 10-324. In the IEEE 754-2008 double precision binary representation, the smallest possible value is a denormalized number. If an implementation does not support denormalized values, the value of Number.MIN_VALUE must be the smallest non-zero positive value that can actually be represented by the implementation. (0.1 + 0.2) === 0.3 // -> false The constants 0.2 and 0.3 in JavaScript are approximations to their true values. It happens that the closest double to 0.2 is larger than the rational number 0.2 but that the closest double to 0.3 is smaller than the rational number 0.3. The sum of 0.1 and 0.2 ends up being larger than the rational number 0.3 and produces the result "false". This problem is so known that there is even a website called 0.30000000000000004.com. It occurs in every language that uses floating-point math, not just JavaScript :D [1, 2, 3] + [4, 5, 6] // -> 1, 2, 34, 5, 6 [1, 2, 3] + [4, 5, 6] // call toString() [1, 2, 3].toString() + [4, 5, 6].toString() // concatenation '1,2,3' + '4,5,6' // -> '1,2,34,5,6' 'b' + 'a' + + 'a' + 'a' // -> baNaNa (Hint: Minions ;) ) The expression is evaluated as 'b' + 'a' + (+'a') + 'a', which converts 'a' to not a number. What will the following code output? const arr = [10, 12, 15, 21]; for (var i = 0; i < arr.length; i++) { setTimeout(function() { console.log('Index: ' + i + ', element: ' + arr[i]); }, 3000); } Index: 4, value: undefined (printed 4 times) Full explanation here: https://www.reddit.com/r/javascript/comments/7535tm/amazon_web_developer_loop_timeout_interview/ What do the two functions below return? function func1() { return { bar: "hello" } } function func2() { return { bar: "hello" } } func1() // -> { bar: "hello" } func2() // -> undefined The reason for this has to do with the fact that semicolons are technically optional in JavaScript (although omitting them is generally really bad form). As a result, the func2 is interpreted as: function func2() { return; { bar: "hello" }; // never be executed } Name one programming paradigm that characterizes JavaScript. We accepted all answers that made sense for this question :) And now, finally, for our winners! 1. Paul Clark Score: 9 Time: 2:18 2. Thai Pangsakulyanont Score: 8 Time: 2:14 3. Rama Score: 7 Time: 2:20 Special Mention: 4. Nick Peekhanov Score: 7 Time: 3:21 5. Aivan Monceller Score: 6 Time: 2:03
15 upvotes

15 upvotes

+3

What happens after you apply?

  1. ApplyClick "Want to Visit"
  2. Wait for a reply
  3. Set a date
  4. Meet up

Company info

Founded on 09/2010

200 members

WeWork Suntec, 5 Temasek Blvd. Level 17, Singapore, 038985