3 Questions for you to see how well do you know JavaScript

3 Questions for you to see how well do you know JavaScript

Here are 3 question to examine your JavaScript knowledge.

Please try to answer before you run and execute the code.

After you see the result, try to understand why.


1. ??

function getLowercase() 

{

    const UNDEFINED = ['U', 'N', 'D', 'E', 'F', 'I', 'N', 'E', 'D'];

 

    return

    {

        UNDEFINED;

    }

}


//What will be the result? why?

console.log('Lower case:', getLowercase())


2.??

const arr = [1, 0, 10, 21];


//What will be the result? why?

console.log(arr.map(parseInt));


3.???♂?

const PIE = 3.14;

const object1 = { pie: PIE };

const object2 = { pie: PIE };


//What will be the result? why?

console.log(object1 === object2);


//That would be different? why?

console.log(object1 == object2);


You're welcome to share your answers, thoughts and more cool things ??


Thanks,

Ziv Ben-Or

[email protected]

+972545882011










Ziv Ben-Or

Senior Full Stack Developer (Vue.js, C#) @Isracard | ?? JavaScript

5 年

{ pie: 3.14 } === { pie: 3.14 }? => false Do you know why?

  • 该图片无替代文字
Ziv Ben-Or

Senior Full Stack Developer (Vue.js, C#) @Isracard | ?? JavaScript

5 年

[1, 0, 10, 21].map(parseInt)? =>?[1, NaN, 2, 7]. Do you know why?

  • 该图片无替代文字
回复
Ziv Ben-Or

Senior Full Stack Developer (Vue.js, C#) @Isracard | ?? JavaScript

5 年

Do you know why?

  • 该图片无替代文字
回复

要查看或添加评论,请登录

Ziv Ben-Or的更多文章

  • Different ways to return data in C#

    Different ways to return data in C#

    When we write a function with complex logic or when the function calls for a third party resource - aside from the…

    1 条评论
  • How To Handle Cases By Range in C# (and JavaScript)

    How To Handle Cases By Range in C# (and JavaScript)

    Sometimes you need to handle cases within a certain range, e.g.

  • Microsoft Dynamics CRM 365 - 3 JavaScript Bugs

    Microsoft Dynamics CRM 365 - 3 JavaScript Bugs

    We are working with Dynamics 365 V 8.2, and in the last year we found 3 bugs when trying to insert data into a record…

    1 条评论
  • Debug Web Resources with Fiddler

    Debug Web Resources with Fiddler

    Today I want to share with you a much easier and faster way to debug your Web-Resources during your development - with…

    3 条评论
  • Recently viewed items Performance issue/bug.

    Recently viewed items Performance issue/bug.

    Today I want to share with you one of the Microsoft's Dynamics CRM issues that causes a serious performance issue…

    12 条评论
  • CRM Visual Studio Extensions part 3

    CRM Visual Studio Extensions part 3

    Today I want to introduce you to Marat Deykun's extension – Microsoft Dynamics CRM Web Resources Updater (yes, a long…

    3 条评论
  • CRM Visual Studio Extensions part 2

    CRM Visual Studio Extensions part 2

    Today I want to introduce you to another Mads Kristensen extension – Web Compiler. This article is for those who…

  • CRM Visual Studio Extensions part 1

    CRM Visual Studio Extensions part 1

    I want to share with you the next series of articles with recommended Visual Studio extensions for Microsoft Dynamics…

  • C# - Using the Result Concept.

    C# - Using the Result Concept.

    I want to recommend you a great concept I'm working with – Result. A colleague of my, Tal Aitelberg, introduced me this…

    2 条评论
  • Managing configuration with multiple environments in Visual Studio - the right way!

    Managing configuration with multiple environments in Visual Studio - the right way!

    It's very common we develop a web application using App.config/Web.

    2 条评论

社区洞察

其他会员也浏览了