mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): remove duplicate JavaScript lecture (#57164)
This commit is contained in:
+1
-5
@@ -8,11 +8,7 @@
|
||||
"challengeOrder": [
|
||||
{
|
||||
"id": "67329f9e9eb84e5c6a5e4366",
|
||||
"title": "What Is a String Object, and How Does It Differ from String Primitive?"
|
||||
},
|
||||
{
|
||||
"id": "6732c6802f4ee8602402176d",
|
||||
"title": "What Is the String Constructor, and When Should You Use It?"
|
||||
"title": "What Is a String Object, and How Does It Differ from a String Primitive?"
|
||||
},
|
||||
{
|
||||
"id": "6732c68f4520d160584a6fd2",
|
||||
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
---
|
||||
id: 6732c6802f4ee8602402176d
|
||||
title: What Is the String Constructor, and When Should You Use It?
|
||||
challengeType: 11
|
||||
videoId: nVAaxZ34khk
|
||||
dashedName: what-is-the-string-constructor-and-when-should-you-use-it
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
Watch the lecture video and answer the questions below.
|
||||
|
||||
# --questions--
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following best describes the `String` constructor?
|
||||
|
||||
## --answers--
|
||||
|
||||
A way to create string primitives in JavaScript.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about the difference between a string primitive and an object.
|
||||
|
||||
---
|
||||
|
||||
A way to create `String` objects, which wrap string primitives in an object
|
||||
|
||||
---
|
||||
|
||||
A method for converting numbers to strings.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about the difference between a string primitive and an object.
|
||||
|
||||
---
|
||||
|
||||
A method for joining two strings together.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about the difference between a string primitive and an object.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
2
|
||||
|
||||
## --text--
|
||||
|
||||
Why is it generally better to use string literals instead of the `String` constructor?
|
||||
|
||||
## --answers--
|
||||
|
||||
String literals are more efficient and easier to work with.
|
||||
|
||||
---
|
||||
|
||||
String literals allow you to create new objects.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Consider the simplicity and performance differences between primitives and objects.
|
||||
|
||||
---
|
||||
|
||||
String literals prevent errors in your code.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Consider the simplicity and performance differences between primitives and objects.
|
||||
|
||||
---
|
||||
|
||||
String literals are the only way to create strings in JavaScript
|
||||
|
||||
### --feedback--
|
||||
|
||||
Consider the simplicity and performance differences between primitives and objects.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
1
|
||||
|
||||
## --text--
|
||||
|
||||
In what situation might you consider using the `String` constructor?
|
||||
|
||||
## --answers--
|
||||
|
||||
When you want to concatenate two strings.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about when a string might need to behave like an object.
|
||||
|
||||
---
|
||||
|
||||
When you need to treat your string as an object to access specific properties or methods.
|
||||
|
||||
---
|
||||
|
||||
When you want to create a string with multiple lines.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about when a string might need to behave like an object.
|
||||
|
||||
---
|
||||
|
||||
When you need to loop through the characters of a string.
|
||||
|
||||
### --feedback--
|
||||
|
||||
Think about when a string might need to behave like an object.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
2
|
||||
Reference in New Issue
Block a user